Skip to content

Commit

Permalink
TODO: Null value case
Browse files Browse the repository at this point in the history
Added reminder to investigate a possible bug
  • Loading branch information
ChadSimmons authored Jan 27, 2023
1 parent e60643d commit 302d0f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ConfigMgr/Troubleshooting/Test-PendingRestart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Function Test-PendingRestartEx {
} else {
$RestartStatus.Online = $false
}
#TODO: Verify the case of one having a null value which may result in an invalid state
$RestartStatus.RestartPending=($RestartStatus.CBServicing -or $RestartStatus.CCMClient -or $RestartStatus.DomainJoin -or $RestartStatus.ComputerRename -or $RestartStatus.FileRename -or $RestartStatus.WindowsUpdate)
Write-Host "$($RestartStatus.Computer) is $($RestartStatus.RestartPending)"
$ComputerStatus += $RestartStatus
Expand Down Expand Up @@ -259,4 +260,4 @@ If ($doRestart) {
# Output result table to console
$Results | Select-Object Computer, Online, RestartPending, RestartAction, CBServicing, WindowsUpdate, CCMClient, ComputerRename, DomainJoin, FileRename, FileRenameVal, Comment | Format-Table -AutoSize
If ($ResultsFile) { Write-Host "Results saved to $ResultsFile" }
#endregion ######################### Main Script ###############################
#endregion ######################### Main Script ###############################

0 comments on commit 302d0f4

Please sign in to comment.