Scripting Blog [archived]

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

Use a PowerShell Function to See If a Command Exists

Summary: Microsoft Scripting Guy, Ed Wilson, writes a Windows PowerShell function to see if a command exists before calling the command. Microsoft Scripting Guy, Ed Wilson, is here. This Thursday, February 21, 2013, I will be on the PowerScripting Podcast. I always enjoy talking with Jon and Hal, and while I am not sure of the actual agenda, I...

Use PowerShell to Convert to or from JSON

Summary: Windows PowerShell MVP, Doug Finke, discusses using a simple Windows PowerShell command to convert to or from JSON. Microsoft Scripting Guy, Ed Wilson, is here. Today we have guest blogger, Doug Finke. (image) Microsoft Windows PowerShell MVP, Doug Finke is the author of Windows PowerShell for Developers. He works in New York City ...

Use PowerShell Environmental Variables to Store Temporary Information

Summary: Use the Windows PowerShell environmental drive to store temporary information, and still use the Set-StrictMode cmdlet. Microsoft Scripting Guy, Ed Wilson, is here. It is exactly 11 days until the 2012 Scripting Games commence. Here is how I found out that salient piece of information. New-TimeSpan -Start (get-date) -End "april 2, ...

Avoid PowerShell Errors by Initializing Variables

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Set-StrictMode Windows PowerShell cmdlet to aid in detecting uninitialized variables. Microsoft Scripting Guy, Ed Wilson, is here. Charlotte, North Carolina is alive with color this morning. There is a blue jay sitting on the light post at the end of the driveway, and a ...

Use Strict Mode for PowerShell to Help You Write Good Code

Summary: Microsoft Scripting Guy, Ed Wilson, talks about calling a method like a function and using Windows PowerShell strict mode to aid script development. Microsoft Scripting Guy, Ed Wilson, is here. Believe it or not, the 2012 Scripting Games begin in less than two weeks! That is right, less than two weeks; it hardly seems possible. But ...