August 25th, 2013

PowerTip: Find PowerShell Events and Levels

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find PowerShell related events and levels.

Hey, Scripting Guy! Question How can I find events that are related to Windows PowerShell in the event and diagnostic logs, and see the level for those events?

Hey, Scripting Guy! Answer Use the Get-WinEvent cmdlet and a wildcard character for LogName, select the logname and level properties, and make it easy by filtering only Unique entries:

Get-WinEvent -LogName *powershell* | select logname, level -Unique

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.