Install updates only as admin
This commit is contained in:
parent
7a99482bc8
commit
b034dfd53d
|
@ -124,15 +124,17 @@ $null = New-Module {
|
|||
break;
|
||||
}
|
||||
default {
|
||||
$null = Import-Module PSWindowsUpdate;
|
||||
if (Test-Admin) {
|
||||
$null = Import-Module PSWindowsUpdate;
|
||||
|
||||
Invoke-Hook "Invoke-WindowsUpdate" -Fallback {
|
||||
Update-WindowsInstallation;
|
||||
};
|
||||
Invoke-Hook "Invoke-WindowsUpdate" -Fallback {
|
||||
Update-WindowsInstallation;
|
||||
};
|
||||
|
||||
if ((Get-WURebootStatus -Silent)) {
|
||||
Restart-Intermediate;
|
||||
return;
|
||||
if ((Get-WURebootStatus -Silent)) {
|
||||
Restart-Intermediate;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
|
|
Loading…
Reference in a new issue