Install updates only as admin

This commit is contained in:
Manuel Thalmann 2024-08-09 16:02:24 +02:00
parent 8c4c85383b
commit 32e4242d60

View file

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