
This article is eagerly awaiting to be written (honestly)!
Continue reading →
All men die, not all men really script
September 30th, 2008 — PowerShell

This article is eagerly awaiting to be written (honestly)!
Continue reading →
July 27th, 2008 — PowerShell

Some cmdlets can provide verbose data. This is disabled by default but can be enabled by using the -Verbose parameter. This can be useful if you want to log an action or troubleshoot your scripts.
Continue reading →
July 27th, 2008 — PowerShell

The OutBuffer parameter determines how many objects will be buffered before calling the next cmdlet in the pipeline.
Instead of typing out -OutBuffer you can use -ob for short.
Continue reading →
June 9th, 2008 — PowerShell

Like many other aspects of PowerShell, -ErrorAction kind of explains itself when you think of it. Basically it instructs PowerShell what action to take when an error occurs. The actions you can set are Continue (which is default), Stop, SilentlyContinue and Inquire. Let’s take a look. Continue reading →
May 26th, 2008 — PowerShell

What if you just deleted 5000 accounts from your active directory domain by accident, what if there had been an easy way to make sure you were doing the right thing before the deletion. Would you have wanted to use it? I know I would. Just imagine you were planning on deleting all accounts which had been disabled for six months but you forgot some important switch and most of your accounts were gone because of that stupid switch.
Continue reading →
May 26th, 2008 — PowerShell

It is said that we learn from our mistakes, and that to improve learning it’s best to write things down. How about storing our mistakes and errors in a variable? If that’s not killing two flies with one stone, at least it’s a useful feature of PowerShell. Let’s use it and see how it works, using the Stop-Service cmdlet we try to stop a service: Continue reading →
May 21st, 2008 — PowerShell

Imagine you are feeling handy and start out to rebuild your bathroom. Now imagine you’re standing knee deep in water in your basement. I bet you wished that somewhere in your head there was a tiny voice which had asked you, “do you really want to drill there”? This is the purpose of the PowerShell -Confirm parameter. If you’re running a cmdlet which changes the system state you can use -Confirm in order to get a question asking you if you really want to go ahead with the change.
Continue reading →
May 19th, 2008 — PowerShell

Building on the Perl motto; “There’s more than one way to do it”, PowerShell lovers will tell you that they can play too. Basically the -OutVariable parameter stores the output from a cmdlet to a variable and at the same time letting the cmdlet display all the output to the screen. For example looking at the Get-ChildItem cmdlet you can store the output in a variable by doing:
May 7th, 2008 — PowerShell

PowerShell uses for different settings called Execution Policy which governs how scripts will run on your computer and if they need to be digitally signed. Get-ExecutionPolicy is a Cmdlet which allows you to view which Execution Policy that is currently used by your computer. Continue reading →
May 1st, 2008 — PowerShell

Probably the first thing you ever do whenever you learn a new language is to write your hello world program, however in PowerShell the most simple script will cause it to crash!
Instead of the friendly greeting PowerShell will spit back: Continue reading →