logo powershell

Restart redenen achterhalen via powershell

Powershell biedt uitkomst wanneer je op zoek bent naar restart-events.

Get-EventLog -LogName System |? {$_.EventID -in (6005,6006,6008,6009,1074,1076)} | ft TimeGenerated,EventId,Message -AutoSize -wrap

the following reason: Operating System: Service pack (Planned) > Windows Update

the following reason: No title for this reason could be found > een niet zo nette restart taak shutdown.exe /r /f ipv shutdown.exe /r /f /c “Periodic Restart”