Install updates only as admin

This commit is contained in:
Manuel Thalmann 2024-08-09 16:02:24 +02:00
parent 1f0e5b80e0
commit d6362632fb

View file

@ -123,6 +123,7 @@ $null = New-Module {
break; break;
} }
default { default {
if (Test-Admin) {
$null = Import-Module PSWindowsUpdate; $null = Import-Module PSWindowsUpdate;
Invoke-Hook "Invoke-WindowsUpdate" -Fallback { Invoke-Hook "Invoke-WindowsUpdate" -Fallback {
@ -133,6 +134,7 @@ $null = New-Module {
Restart-Intermediate; Restart-Intermediate;
return; return;
} }
}
<# <#
.SYNOPSIS .SYNOPSIS