Weekend Scripter: Test Performance of Event Log Queries—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, talks about comparing the performance of various Windows PowerShell event log queries. Microsoft Scripting Guy, Ed Wilson, is here. Today I present a video where I talk about examining the performance of various queries from the event log. Note  For more information about this technique, see Check Performance of…


PowerTip: Prompt for Input for PowerShell Script

Summary: Learn how to prompt for input for your Windows PowerShell script.  How can I use Windows PowerShell as an easy way to prompt a user for information for my script?  Use Read-Host, for example: $a = Read-Host -Prompt "enter your input" The users input is stored in the $a variable. Note  Depending on what you are doing, using…


Filtering Event Log Entries with PowerShell—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, presents a video that explores filtering event log entries with Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Today I present a video where I talk about using a filter hash table to filter events from the event log. Note  For more information about this technique, see Filtering…


PowerTip: Record Commands and Output from PowerShell

Summary: Learn how to easily record commands and output from commands in Windows PowerShell.    How can I create a text file all commands and output from the commands that I use in Windows PowerShell?  Use the Start-Transcript cmdlet. To stop the transcript, use Stop-Transcript. Note  In Windows PowerShell 5.0 on Windows 10, Start-Transcript also works inside the Windows PowerShell ISE. In…


Parsing Event Log Messages—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, presents a video about parsing Windows event log messages. Microsoft Scripting Guy, Ed Wilson, is here. Today I present a video where I talk about using a cmdlet to parse event log messages.      Note  For more information about this technique, see Easy Parsing of Messages with PowerShell….


PowerTip: Measure Performance of PowerShell Command

Summary: Measure how long it takes for a Windows PowerShell command to complete.    If I change one command to try to improve the speed of my Windows PowerShell script , how can I see if            that command is faster than the one I changed?  Use the Measure-Command cmdlet. For example, to…


Check Performance of Event Log Queries

Summary: Ed Wilson, Microsoft Scripting Guy, talks about checking the performance of various event log queries. Microsoft Scripting Guy, Ed Wilson, is here. One of the great things about Windows PowerShell is that I can use Windows PowerShell to see how it is doing and how to optimize it. Sometimes the difference between one query…


PowerTip: Query Multiple Event Logs at Once

Summary: Learn how to use Windows PowerShell to query multiple event logs at one time.  How can I use Windows PowerShell to query events that happened and may be in multiple event logs?  Use the Get-WinEvent cmdlet, specify the LogName parameter for both logs, and specify today            for the StartTime, for example: Get-WinEvent @{logname='application','system';starttime=[datetime]::today }


Event Log Queries Using PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to query event logs. Microsoft Scripting Guy, Ed Wilson, is here. Today I talk a bit more about using Windows PowerShell to make queries from the event log. Although most large enterprises already have an event log monitoring application, at times it is useful…


PowerTip: Find PowerShell Superheroes

Summary: Follow the adventures of PowerShell superheroes.  How can I follow the adventures of a couple of PowerShell superheroes as they use PowerShell commands to solve            real world problems?  You want to follow the adventures of BATCHman and Cmdlet (the boy blunder) as they battle Tapeworm, the evil Hextor, and other…