Created
November 16, 2017 09:06
-
-
Save yradunchev/b217b85f5e237e3705fa94e95ad81156 to your computer and use it in GitHub Desktop.
Check servers for reboots pending
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-Content C:\scripts\serverslist.txt | | |
| % { Invoke-WmiMethod -ComputerName $_ -Namespace root\ccm\clientsdk -Class CCM_ClientUtilities -Name DetermineIfRebootPending | | |
| select PSComputerName,RebootPending,RebootDeadline } | | |
| Export-Csv -NoTypeInformation C:\scripts\PendingReboots.csv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment