-
Notifications
You must be signed in to change notification settings - Fork 0
Get PendingReboot
Marco van Gaal edited this page Aug 5, 2015
·
6 revisions
Get-PendingReboot
Gets the pending reboot status on a local or remote computer.
-ComputerName <String[]>
A single Computer or an array of computer names. The default is localhost ($env:COMPUTERNAME).
Required? false
Position? 1
Default value "$env:COMPUTERNAME"
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-ErrorLog <String>
A single path to send error data to a log file.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Author: Brian Wilhite
Date: 08/29/2012
PSVer: 2.0/3.0
Updated: 05/30/2013
UpdNote: Added CCMClient property - Used with SCCM 2012 Clients only
Added ValueFromPipelineByPropertyName=$true to the ComputerName Parameter
Removed $Data variable from the PSObject - it is not needed
Bug with the way CCMClientSDK returned null value if it was false
Removed unneeded variables
Added PendFileRenVal - Contents of the PendingFileRenameOperations Reg Entry
-------------------------- EXAMPLE 1 --------------------------
PS C:\>Get-PendingReboot -ComputerName (Get-Content C:\ServerList.txt) | Format-Table -AutoSize
Computer CBServicing WindowsUpdate CCMClientSDK PendFileRename PendFileRenVal RebootPending
-------- ----------- ------------- ------------ -------------- -------------- -------------
DC01 False False False False
DC02 False False False False
FS01 False False False False
This example will capture the contents of C:\ServerList.txt and query the pending reboot
information from the systems contained in the file and display the output in a table. The
null values are by design, since these systems do not have the SCCM 2012 client installed,
nor was the PendingFileRenameOperations value populated.
-------------------------- EXAMPLE 2 --------------------------
PS C:\>Get-PendingReboot
Computer : WKS01
CBServicing : False
WindowsUpdate : True
CCMClient : False
PendFileRename : False
PendFileRenVal :
RebootPending : True
This example will query the local machine for pending reboot information.
-------------------------- EXAMPLE 3 --------------------------
PS C:\>$Servers = Get-Content C:\Servers.txt
PS C:\> Get-PendingReboot -Computer $Servers | Export-Csv C:\PendingRebootReport.csv -NoTypeInformation
This example will create a report that contains pending reboot information.
Component-Based Servicing:
http://technet.microsoft.com/en-us/library/cc756291(v=WS.10).aspx
PendingFileRename/Auto Update:
http://support.microsoft.com/kb/2723674
http://technet.microsoft.com/en-us/library/cc960241.aspx
http://blogs.msdn.com/b/hansr/archive/2006/02/17/patchreboot.aspx
SCCM 2012/CCM_ClientSDK:
http://msdn.microsoft.com/en-us/library/jj902723.aspx