From cafe156bba06a7513b3bf619d3c8fea33f7b3a21 Mon Sep 17 00:00:00 2001 From: simeononsecurity <4913771+simeononsecurity@users.noreply.github.com> Date: Sat, 10 Apr 2021 00:19:37 -0500 Subject: [PATCH] Windows Update Changes --- windows10-basic.ps1 | 5 +++-- windows10.ps1 | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/windows10-basic.ps1 b/windows10-basic.ps1 index b799691..92ef082 100644 --- a/windows10-basic.ps1 +++ b/windows10-basic.ps1 @@ -18,8 +18,9 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force Import-Module PSWindowsUpdate -Force Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false - Install-WindowsUpdate -MicrosoftUpdate -AcceptAll - Get-WuInstall -AcceptAll -IgnoreReboot + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install + Get-WuInstall -AcceptAll -IgnoreReboot -IgnoreUserInput -nottitle 'preview' + Get-WindowsUpdate –Install } } diff --git a/windows10.ps1 b/windows10.ps1 index 30689d6..0d11888 100644 --- a/windows10.ps1 +++ b/windows10.ps1 @@ -13,14 +13,14 @@ Start-Job -Name "Install and Configure Chocolatey" -ScriptBlock { choco upgrade all refreshenv Start-Job -Name "Installing Windows Updates" -ScriptBlock { - Start-Sleep 60 Write-Host "Install Latest Windows Updates" choco install pswindowsupdate Set-Executionpolicy -ExecutionPolicy RemoteSigned -Force Import-Module PSWindowsUpdate -Force Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false - Install-WindowsUpdate -MicrosoftUpdate -AcceptAll - Get-WuInstall -AcceptAll -IgnoreReboot + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install + Get-WuInstall -AcceptAll -IgnoreReboot -IgnoreUserInput -nottitle 'preview' + Get-WindowsUpdate –Install } }