PowerTip: Find PowerShell Events and Levels

Doctor Scripto

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

0 comments

Discussion is closed.

Feedback usabilla icon