bcwilhite / PendingReboot

Module to detect Windows OS pending reboots
MIT License
125 stars 26 forks source link

PendingReboot

Build Status

Module to detect Windows OS pending reboots.

This module leverages WMI in order to query the Registry for various pending reboot detections.

How to use

Deploy the PendingReboot folder from the Release folder to your PSModulePath, i.e. PendingReboot and PowerShell will automatically find/load the module.

This module is also published on the PowerShell Gallery, so installing it via PowerShell is an option:

Install-Module -Name PendingReboot

Functions

Test-PendingReboot

Versions

0.9.0.6

0.9.0.5

0.9.0.0

Examples

Test the pending reboot status of the local computer

PS C:\> Test-PendingReboot

ComputerName IsRebootPending
------------ ---------------
WKS01                   True

Test the pending reboot status of a local computer, returning only a bool value

PS C:\> (Test-PendingReboot).IsRebootPending
True

Test the pending reboot status of a remote computer called 'DC01' and return detailed information

PS C:\> Test-PendingReboot -ComputerName DC01 -Detailed

ComputerName                     : dc01
ComponentBasedServicing          : True
PendingComputerRenameDomainJoin  : False
PendingFileRenameOperations      : False
PendingFileRenameOperationsValue :
SystemCenterConfigManager        : False
WindowsUpdateAutoUpdate          : True
IsRebootPending                  : True

Test the pending reboot status of a remote computer called 'DC01', with detialed information, skipping System Center Configuration Manager Agent and PendingFileRenameOperation Checks

PS C:\> Test-PendingReboot -ComputerName DC01 -SkipConfigurationManagerClientCheck -SkipPendingFileRenameOperationsCheck -Detailed

CommputerName                    : dc01
ComponentBasedServicing          : True
PendingComputerRenameDomainJoin  : False
PendingFileRenameOperations      : False
PendingFileRenameOperationsValue :
SystemCenterConfigManager        :
WindowsUpdateAutoUpdate          : True
IsRebootPending                  : True