≡ Menu

Using Parametersets in PowerShell

Parameter sets in PowerShell allows grouping of parameters so that availability of parameters is controlled based on what is already specified and at what position. Great way to write proper production scripts. They are available from PowerShell V2 onward.

I found couple of useful posts on this topic which are giving good explanation of this approach with some easy examples. It is important to understand them property before try in your scripts. Otherwise you will end up removing them from code due to frustration. That means you are loosing great power in validating the arguments.

Below are the two articles I found useful to understand parameter sets.



Happy learning…