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:
I changed line 22 to '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Install-PackageProvider -Name NuGet -MinimumVersion 184.108.40.206 -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.