Disable Windows Update reboot only as admin

This commit is contained in:
Manuel Thalmann 2024-08-16 14:35:35 +02:00
parent 01981835ba
commit 1bad412e7e

View file

@ -29,7 +29,10 @@ $null = New-Module {
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE; $env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
} }
Disable-WindowsUpdateAutoRestart; if (Test-Admin) {
Disable-WindowsUpdateAutoRestart;
}
New-Alias -Force "sudo" gsudo; New-Alias -Force "sudo" gsudo;
& $Action; & $Action;
} }