Created
October 13, 2014 09:38
-
-
Save trondhindenes/9ec8f71bfc69d81c25c5 to your computer and use it in GitHub Desktop.
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
# Check if reboot is required, if so notify CA. The MSFT_ServerManagerTasks provider is missing on client SKUs | |
$featureData = invoke-wmimethod -EA Ignore -Name GetServerFeature -namespace root\microsoft\windows\servermanager -Class MSFT_ServerManagerTasks | |
$regData = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" "PendingFileRenameOperations" -EA Ignore | |
if(($featureData -and $featureData.RequiresReboot) -or $regData) | |
{ | |
Write-Verbose $LocalizedData.MachineRequiresReboot | |
$global:DSCMachineStatus = 1 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment