From 0a3eceacae2d3d8d4f9a01eb5c71508f59e0e5c2 Mon Sep 17 00:00:00 2001 From: Upgrayedd Date: Tue, 30 Jul 2024 23:40:39 -0500 Subject: [PATCH] Update Windows/PSPatching.ps1 --- Windows/{PSPatching.txt => PSPatching.ps1} | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) rename Windows/{PSPatching.txt => PSPatching.ps1} (96%) diff --git a/Windows/PSPatching.txt b/Windows/PSPatching.ps1 similarity index 96% rename from Windows/PSPatching.txt rename to Windows/PSPatching.ps1 index 2bfa79e..95ea07e 100644 --- a/Windows/PSPatching.txt +++ b/Windows/PSPatching.ps1 @@ -1,16 +1,16 @@ -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Install-Module PSWindowsUpdate -Force -Import-Module PSWindowsUpdate - - -Get-WUList -verbose - - -Install-WindowsUpdate -AcceptAll -ignorereboot | Out-File "C:\Windows\Temp\$(get-date -f yyyy-MM-dd)-WindowsUpdate.log" -force - -Get-WURebootStatus -silent - - -$tonight = (Get-Date -Hour 23) +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force +Install-Module PSWindowsUpdate -Force +Import-Module PSWindowsUpdate + + +Get-WUList -verbose + + +Install-WindowsUpdate -AcceptAll -ignorereboot | Out-File "C:\Windows\Temp\$(get-date -f yyyy-MM-dd)-WindowsUpdate.log" -force + +Get-WURebootStatus -silent + + +$tonight = (Get-Date -Hour 23) Get-WURebootStatus -ScheduleReboot $tonight | select RebootScheduled \ No newline at end of file