Use PowerShell to Create Ordered Dictionary

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to create an ordered dictionary. Microsoft Scripting Guy, Ed Wilson, is here. One of the really cool things that was introduced in Windows PowerShell 3.0, is that I can create an ordered dictionary. Basically, an ordered dictionary works like a Windows PowerShell hash table. The…


PowerTip: Use PowerShell to Create Hash Table

Summary: Use a Windows PowerShell cmdlet to create a hash table.  How can I use Windows PowerShell to create a hash table if do not remember the special syntax?  Use the ConvertFrom-StringData cmdlet, and put each key-value pair on its own line.           (You can perform this on a single line by using backtick…


Phantom Elements in a Hash Table

Summary: Microsoft PFE and guest blogger, Chris Wu, talks about working with hash tables. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Chris Wu… Admittedly, hash tables didn’t catch my attention when I started using Windows PowerShell, but over time it has proven to be one of my favorites. This is largely…


Weekend Scripter: Improve Performance When Combining PowerShell Arrays

Summary: Microsoft premier field engineer, Chris Wu, talks about combining Windows PowerShell arrays. Microsoft Scripting Guy, Ed Wilson, is here. Chris Wu, a Microsoft PFE, is back to share his knowledge. See previous Hey, Scripting Guy! Blog guest posts from Chris. Here is contact information for Chris: Twitter: https://twitter.com/chwu_ms Facebook: https://www.facebook.com/mschwu LinkedIn: http://ca.linkedin.com/in/mschwu Take it…


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,…


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…


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)….


Format Multilevel Arrays in PowerShell

Summary: Microsoft Scripting Guy Ed Wilson talks about formatting multilevel arrays in Windows PowerShell.   Hey, Scripting Guy! I am having a problem with arrays. I have two-level arrays and they work perfectly when I have the arrays defined on a single line. But when I try to format my script so that it is…


Use PowerShell to Pick Random Winning Users from Text

Summary: Learn how to use Windows PowerShell to select random winners from a text file.   Hey, Scripting Guy! I have a question. It is neither a vital server performance issue nor is it a dramatic process optimization revelation, but it is something that will make my life a lot easier. First the background: I…