Pre- and Post-Incrementing Do...While Loop in PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, talks about pre- and post-incrementing the Do…While loop in Windows PowerShell.  Hey, Scripting Guy! I think that I found a bug in Windows PowerShell. In fact, I am pretty sure that I have. It involves using the ++ increment operator. For example, I know that $a = $a +…


PowerShell Looping: The Continue Statement

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Continue statement in looping. Microsoft Scripting Guy, Ed Wilson, is here. Dude, dude, dude (or dudette). TechEd 2014 is nearly here. Tomorrow the Scripting Wife and I jump onto a big old hairy plane and head to Houston, Texas for TechEd 2014 North America. We…


PowerShell Looping: Advanced Break

Summary: Microsoft Scripting Guy, Ed Wilson, talks about additional uses for the Break statement in looping. Microsoft Scripting Guy, Ed Wilson, is here. This morning, it is cool and the sun is barely up. I am sipping a cup of English Breakfast tea with a spoonful of spearmint and peppermint leaves, and a cinnamon stick….


PowerShell Looping: Basics of the Break

Summary: Microsoft Scripting Guy, Ed Wilson, talks about the basics of using the Break statement in a Windows PowerShell loop. Microsoft Scripting Guy, Ed Wilson, is here. Hmmm, it seems that the Scripting Wife and I just returned from the Windows PowerShell Summit, and yet in four days, we are leaving for TechEd in Houston….


PowerShell Looping: Understanding and Using Do…Until

Summary: Microsoft Scripting Guy, Ed Wilson, talks about understanding and using the Do…Until loop. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I are busy getting ready for TechEd 2014 North America, which will be in Houston, Texas this year. It kicks off this Sunday with registration and preconference sessions. This year,…


PowerShell Looping: Understanding and Using Do...While

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Do…While statement in Windows PowerShell scripts. Microsoft Scripting Guy, Ed Wilson, is here. Last week, the Scripting Wife and I were at the Windows PowerShell Summit in Bellevue, Washington. It was an awesome week. We got to reconnect with many old friends, and we also…


PowerShell Looping: The Automatic Foreach

Summary: Microsoft Scripting Guy, Ed Wilson, talks about Windows PowerShell and the automatic Foreach feature. Microsoft Scripting Guy, Ed Wilson, is here. One of my favorite features in Windows PowerShell (since Windows PowerShell 3.0) is what I call the automatic Foreach. Basically, it means that I can access a particular property of a collection by direct…


PowerShell Looping: Using While

Summary: Microsoft Scripting Guy, Ed Wilson, talks about Windows PowerShell looping and looks at using the While statement. Microsoft Scripting Guy, Ed Wilson, is here. One of the things that I see with people coming to Windows PowerShell from VBScript or some other language, is that they seem to like to use the While statement….


PowerShell Looping: Using the Foreach-Object Cmdlet

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Foreach-Object cmdlet in Part 2 of the Looping Week series. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to address a major point of confusion for newbie Windows PowerShell scripters. That point is the Foreach-Object cmdlet. Part of the confusion comes with the alias,…


Basics of PowerShell Looping: Foreach

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Windows PowerShell Foreach statement to loop through a collection. Microsoft Scripting Guy, Ed Wilson, is here. When the Scripting Wife and I were in Amsterdam, Windows PowerShell MVP, Jeff Wouters, told me that a lot of people he ran across had problems looping through collections…