Files
Intune/intune/Externally Sourced Remediations/ToastNotifications/Get-PendingWindowsUpdate/Detect_PendingWindowsUpdate.ps1
2025-05-19 15:19:36 -04:00

8 lines
158 B
PowerShell

$updates = Get-WindowsUpdate -AcceptAll -IgnoreReboot
if ($updates.Count -gt 0) {
Write-Output "Pending Windows updates"
exit 1
} else {
exit 0
}