PowerShell · Administration

Ausstehenden Windows-Neustart prüfen

Prüft mehrere übliche Windows-Indikatoren auf einen ausstehenden Neustart.

PowerShell
$checks = [ordered]@{
  CBS = Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending'
  WindowsUpdate = Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired'
  PendingFileRename = $null -ne (Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name PendingFileRenameOperations -ErrorAction SilentlyContinue)
}
[pscustomobject]$checks
PowerShellWindowsNeustartAdministration
WA