Scripting Blog

A place to learn about PowerShell and share stories of automation

Dude, a String Is a String in PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using string methods to determine null or empty in Windows PowerShell.  Hey, Scripting Guy! I have a problem with a script. It is used to write data to another application, but sometimes the variables in it are empty. I have tried to detect this by checking to see if the variable is...

Analyzing PowerShell Script Files

Summary: Learn how to analyze Windows PowerShell script files. Microsoft Scripting Guy, Ed Wilson, is here. This morning I am sitting around sipping a cup of English Breakfast tea. I added some peppermint, spearmint, lemon grass, licorice root, and a cinnamon stick to the pot. The result is a very refreshing cup of tea. I am sitting on the ...

Use Select-String Cmdlet in PowerShell to View Contents of Log File

Summary: Use the Windows PowerShell cmdlet, Select-String, to view the contents of a log file.  Hey, Scripting Guy! I have a log file that I created by dumping process information from Get-Process. It is quite long, and I am trying to use Select-String to find the number of instances of a certain process. The problem is that when I find ...

Fun Formatting Ones—Part 2: The Method

Summary: June Blender explains Doug Finke's multiplication and formatting trick. Today...the method. Microsoft Scripting Guy, Ed Wilson, is here. This is the second part of a two-part series written by June Blender, Honorary Scripting Guy. In the first part, Fun Formatting Ones—Part 1: The Task, we discussed the task of printing Doug's ...

Fun Formatting Ones—Part 1: The Task

Summary: June Blender explains Doug Finke's multiplication and formatting trick. Today...the task. Microsoft Scripting Guy, Ed Wilson, is here. Today, Honorary Scripting Guy, June Blender, examines a multiplication and formatting trick that Doug Finke posted on the PowerShell Facebook page. I've broken this article into two parts: ...