Scripting Blog [archived]

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

Combine Arrays and Hash Tables in PowerShell for Fun and Profit

Summary: Take your Windows PowerShell scripting to the next level by combining hash tables and arrays. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I are anxiously counting down the days until the first ever Pittsburgh PowerShell Users Group meeting. The event is quickly selling out; therefore, if you want to attend, you...

Create a Hash Table in PowerShell that Contains Hash Tables

Summary: Learn how to work with hash tables that contain other hash tables in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Well, it is a typical winter day here in Charlotte, North Carolina in the United States. I am not talking about a nice, cool, sunny day with cobalt blue skies streaked by fluffy cotton candy clouds&...

Easily Create and Manipulate an Array of Arrays in PowerShell

Summary: Learn about creating an array of arrays in Windows PowerShell, and see how to store numerical data and rich objects in elements. Microsoft Scripting Guy, Ed Wilson, is here. Yesterday in Charlotte, North Carolina in the United States, it was 60 degrees Fahrenheit (that is 15 degrees Celsius according to my unit conversion module). I ...

Read a CSV File and Build Distinguished Names on the Fly by Using PowerShell

Summary: Learn two ways to read a CSV file with Windows PowerShell and build distinguished names on the fly. (image) Hey, Scripting Guy! I am working on my first big project with Windows PowerShell, and I have been unable to locate a good answer on the Internet. I am having trouble figuring out how to connect a bunch of different array items...

Find the Index Number of a Value in a PowerShell Array

Summary: In this blog post, Microsoft Scripting Guy, Ed Wilson, talks about finding the index number of a value in a Windows PowerShell array. Microsoft Scripting Guy, Ed Wilson, is here. The other day, the Scripting Wife and I were invited to speak with a customer in Charlotte. Our contact, Rafael, is a really cool guy (he is also a SQL ...