Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Use PowerShell to Open Files That Contain Matching Words

Summary: Learn how to use Windows PowerShell to search a folder for matching strings and to open them automatically in Notepad.   (image) Hey, Scripting Guy! I have been enjoying using the Select-String cmdlet, but I have a question. When I use Select-String, it lists the file that it finds the match in, but I have to copy and paste from ...

Use an Easy PowerShell Command to Search Files for Information

Summary: Learn how to use a Windows PowerShell command to search easily for information in a collection of files.   (image) Hey, Scripting Guy! I need to be able to parse multiple files for text that are in a single folder. I hate to have to write a script for such a common task, but I am afraid I will have to do so. Can you help me? &...

Learn How to Use PowerShell to Parse the Firewall Log

Summary: Microsoft Scripting Guy Ed Wilson shows how to use Windows PowerShell to parse the Windows Firewall log.   (image) Hey, Scripting Guy! I am wondering about the firewall log on my computer. I was in a hotel recently, and I noticed that the network adapter light kept flashing, but I was not like doing anything really. When I tried ...

Use the PowerShell Select-String Cmdlet to Parse WMI Output

Summary: Learn how to use the Windows PowerShell Select-String cmdlet to easily parse WMI output.   (image) Hey, Scripting Guy! I have a quick question: is it possible to parse the output of some of the WMI commands? I know they return objects, but some of the commands return sooooo much data. I would like a quick and easy way to look for...