PowerTip: Use PowerShell to Find Application Hangs

Summary: Learn how to use Windows PowerShell to find applications that are hanging.

Hey, Scripting Guy! Question How can I find which applications are hanging on my desktop computer that is running Windows 8?

Hey, Scripting Guy! AnswerUse the Get-EventLog cmdlet to query the application log for InstanceID 1002 and a source of *hang*.
         Select TimeWritten and Message to see what applications are hanging and when these hangs occur.

Get-EventLog -LogName application -Newest 20 -InstanceId 1002 -source *hang*|
select timewritten, message 

Comments (2)

  1. happysysadm says:

    This is really cool!

    There are things you can do in Powershell which are so powerful, but unfortunately it is not automatic for me yet and I use it just for complex tasks…

    Thanks for sharing!

  2. mredwilson says:

    @Happysysadm Yes, PowerShell really is powerful. I use it for everything, and there are so many cool things with Windows 8 or Windows Server 2012 that are just a cmdlet away, it is my go to tool.

Skip to main content