PowerTip: Use PowerShell to Find Application Hangs

PowerTip: Use PowerShell to Find Application Hangs

  • Comments 2
  • Likes

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 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 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!

  • @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.