For those of you who follow our blog, Brett does a lot of articles about PowerShell and how great it is. So the other day when I need to do a mysql dump of some data on a Windows 2008 server, I fired it up. The deep blue background touched my inner California beach bum, and the verbose bright red error messages made my inner programmer smile.
“This is pretty neat,” I thought. “Maybe Windows has finally made something to compete with Unix’s shell in a real and meaningful way.”
The dump finished and immediately my Common Sense began tingling…
Continue reading


PowerShell’s switch statement is similar to an if statement though easier to implement when you want to evaluate numerous conditions. You can use the switch statement to automate tasks such as retrieving System event log entries and performing actions based on the type of entry, and or moving and deleting files based on their file names.
As I mentioned last time, today’s post is in regards to using pipelines with foreach loops. Whenever you define a collection in a foreach statement, you are more or less setting up a pipeline. Take a look at this example;