Windows Update Changes
This commit is contained in:
@ -18,8 +18,9 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock {
|
|||||||
Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force
|
Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force
|
||||||
Import-Module PSWindowsUpdate -Force
|
Import-Module PSWindowsUpdate -Force
|
||||||
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false
|
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false
|
||||||
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll
|
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install
|
||||||
Get-WuInstall -AcceptAll -IgnoreReboot
|
Get-WuInstall -AcceptAll -IgnoreReboot -IgnoreUserInput -nottitle 'preview'
|
||||||
|
Get-WindowsUpdate –Install
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,14 +13,14 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock {
|
|||||||
choco upgrade all
|
choco upgrade all
|
||||||
refreshenv
|
refreshenv
|
||||||
Start-Job -Name "Installing Windows Updates" -ScriptBlock {
|
Start-Job -Name "Installing Windows Updates" -ScriptBlock {
|
||||||
Start-Sleep 60
|
|
||||||
Write-Host "Install Latest Windows Updates"
|
Write-Host "Install Latest Windows Updates"
|
||||||
choco install pswindowsupdate
|
choco install pswindowsupdate
|
||||||
Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force
|
Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force
|
||||||
Import-Module PSWindowsUpdate -Force
|
Import-Module PSWindowsUpdate -Force
|
||||||
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false
|
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false
|
||||||
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll
|
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install
|
||||||
Get-WuInstall -AcceptAll -IgnoreReboot
|
Get-WuInstall -AcceptAll -IgnoreReboot -IgnoreUserInput -nottitle 'preview'
|
||||||
|
Get-WindowsUpdate –Install
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user