Install updates only as admin
This commit is contained in:
parent
7a99482bc8
commit
b034dfd53d
1 changed files with 9 additions and 7 deletions
|
@ -124,6 +124,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 {
|
||||||
|
@ -134,6 +135,7 @@ $null = New-Module {
|
||||||
Restart-Intermediate;
|
Restart-Intermediate;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|
Loading…
Reference in a new issue