This project provides a complete solution for Windows Update Compliance Tracking using a combination of:
- Google Apps Script (as a Web App)
- PowerShell (run on client machines)
The system collects and visualizes update compliance data across endpoints, enabling proactive compliance management through dashboards and notifications.
A Google Apps Script deployed as a Web App that:
- Receives JSON POST requests from the PowerShell script
- Logs update data in a Google Sheet
- Sends email alerts for non-compliance
- Provides a live dashboard and export tools
A client-side PowerShell script that:
- Gathers system and update info
- Installs updates (if available)
- Prompts the user interactively for reboot
- Sends a compliance report to the webhook URL
-
Create Google Sheet
- Name the sheet:
Windows Update Compliance.
- Name the sheet:
-
Open the Apps Script Editor
- Extensions → Apps Script.
-
Paste the Provided Google Script
- Use the full code block provided in
googlesheets.gs.
- Use the full code block provided in
-
Deploy as Web App
- Click
Deploy > Manage Deployments. - Set access to "Anyone with the link" or per your security policy.
- Copy the Web App URL.
- Click
-
Set Email Recipients
- Update
COMPLIANCE_EMAILandNOTIFICATION_EMAILin the script.
- Update
-
Install
PSWindowsUpdateModule (if not present) -
Update Webhook URL
- Set
$GoogleSheetsWebhookUrlat the top of the script.
- Set
-
Schedule Execution
- Deploy as a Scheduled Task with elevated privileges.
-
Interactive Reboot
- Uses a Scheduled Task to prompt the active user.
- Logs the user's choice or timeout.
- Data Logging: Captures update status, OS info, user data.
- Email Alerts:
- Non-compliant systems
- Reboot postponed
- Daily summary (5–6 PM)
- Live Dashboard:
- Compliance rates
- 7‑day trends
- Non-compliant system listing
- Export Tool: Create CSV of non-compliant systems.
- Data Cleanup: Monthly purge of records older than 30 days.
- Scans for Updates
- Installs Patches
- Detects Reboot Requirement
- Interactive User Prompt for Reboot
- Sends Report to Google Sheets
| Field | Description |
|---|---|
Timestamp |
Script run time in ISO format |
ComputerName, UserName, CurrentUser |
Machine & user identity |
OSVersion, OSBuild |
Windows version details |
AvailableUpdates |
Number of updates detected |
UpdatesInstalled |
Number of updates installed |
RebootRequired |
Boolean indicating reboot need |
RebootAction |
Immediate, postponed, or skipped |
ComplianceStatus |
Final compliance state |
IP Address, Domain, RAM, etc. |
Additional system info |
ExecutionDuration |
Runtime duration in minutes |
InstallDetails |
JSON array of updates and statuses |
- Non-Compliant Alert →
COMPLIANCE_EMAIL - Reboot Postponed →
NOTIFICATION_EMAIL - Daily Summary (auto-sent between 5–6 PM)
- Run the PowerShell script manually.
- Check the
%TEMP%log file. - Inspect Google Sheet and Dashboard.
- Verify email notifications are triggered.
- Restrict Web App access to authorized clients.
- Align with your organization’s security and privacy policies.
- Arun Jose – Compliance Automation Engineer (📧
your_email) - Script Maintainer – (📧
another_email)
- v3.1 – “It Just Works” Edition
- Added reliable reboot via
shutdown.exe - Enhanced dashboard reporting
- Robust error handling and modular structure
- Added reliable reboot via
Admin menu items in the Google Sheet:
- Compliance Tools → Refresh Dashboard
- Send Summary Email
- Export Non-Compliant Systems
download as zip maybe?