Tag Archives: cmdletbinding

Pardon the long title. I had a task recently to go through a big folder full of scripts written by random people with equally random skill levels. Lots of the scripts had a -Verbose parameter, but they weren’t all done correctly.

Some scripts correctly included the [CmdletBinding()] line above the param() block. Some just had a [Switch]$Verbose parameter (wrong). Others had both (double wrong, script won’t even run).

Consider the following three functions, which illustrate the three categories I was dealing with.

Just moved in

I just moved my blog from one hosting provider to another. If you see a broken image or some other weirdness, I’d love if you let me know by email at thmsrynr@outlook.com or hit me up on Twitter @MrThomasRayner.