8 lines
158 B
PowerShell
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
|
|
}
|