diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index fe632263..8ccf3bab 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -123,15 +123,17 @@ $null = New-Module { break; } default { - $null = Import-Module PSWindowsUpdate; - - Invoke-Hook "Invoke-WindowsUpdate" -Fallback { - Update-WindowsInstallation; - }; - - if ((Get-WURebootStatus -Silent)) { - Restart-Intermediate; - return; + if (Test-Admin) { + $null = Import-Module PSWindowsUpdate; + + Invoke-Hook "Invoke-WindowsUpdate" -Fallback { + Update-WindowsInstallation; + }; + + if ((Get-WURebootStatus -Silent)) { + Restart-Intermediate; + return; + } } <#