Check if Windows requires a reboot.
This agent procedure populates a custom field in the Audit module called Reboot Status with the result of the pending reboot check.You will need to create a custom field called Reboot Status BEFORE importing the Agent Procedure. This Agent Procedure works for Windows only and uses a PowerShell Module that it imports it from the Microsoft PowerShell Gallery automatically. The Agent Procedure will install NuGet and the PendingReboot PowerShell module by Brian Wilhite, a Microsoft Employee. You can find more information in the documentation and here: https://www.powershellgallery.com/packages/PendingReboot/0.9.0.6
IMPORTANT: THIS AGENT PROCEDURE CHECKS IF THE OS NEEDS A REBOOT, IT DOESN'T CHECK IF VSA REQUIRES THE OS TO REBOOT YET.
works as described, great documentation.
On some servers, I was getting stuck on step 22. When manually running the command, I was getting the error "Unable to download from URI". Found possible resolution on this page:
https://answers.microsoft.com/en-us/windows/forum/windows_7-performance/trying-to-install-program-using-powershell-and/4c3ac2b2-ebd4-4b2a-a673-e283827da143
I changed line 22 to '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force' and it looks like the script completed successfully after this change. Thought I would post in case someone else runs in to any problems running this script.