Use of Get-PendingReboot function

Hello,

Most of my Win7 PCs have powershell 2.0. Is the function Get-PendingReboot compatible with this version?

If yes, can you explain me its use?. I want to create an if statement to exit the script if a pending reboot is detected.

Can someone help?

Thanks

Hi,

$Var_PendingReboot=Get-PendingReboot
If ($Var_PendingReboot -eq $True) {
}

1 Like

Thanks Francois! It worked.
I was using about same syntax but without var_

Perhaps it should be included in documentation.