Use PowerShell to Diagnose an Almost Hung System

I just did a Veeam bare metal restore of a small Server 2016 machine and it is almost completely unresponsive. Why?


1. Log on to the machine. Yes, this could take half an hour.

2. Press Ctrl-Alt-Del and start Task Manager. This gives you slightly elevated priority.

3. In Task Manager, select File > Run new task. Start powershell.exe as Administrator. Optionally, find powershell.exe in the Details window and elevate it to High priority.

3. Use this PowerShell commands to get recent events:

Get-EventLog -LogName System -Newest 20

In this case, I saw lots of storahci Warnings in here.

I also ran this command to get the recent Application log events:

Get-EventLog -LogName Application -Newest 20

Several messages from SQL server, but I assume SQL’s problems are due to the storahci problems.

To see the full message (including the EventID), run these commands until you have captured one of the offending events:

$e = Get-EventLog -LogName System -Newest 1
e$

Then run this command to see the events details:

e$ | Select-Object –Property *

Reference:

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog?view=powershell-5.1

A couple other useful commands that you can run from Task Manager or PowerShell:

devmgmt.msc – start Device Manager

powercfg.cpl – start Power Options (Control Panel)

eventvwr.exe – start Event Viewer

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.