Install updates only as admin
This commit is contained in:
parent
1f0e5b80e0
commit
d6362632fb
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue