Specifying PowerShell Parameter Position

Positional Parameters Whether you know it or not, if you’ve used PowerShell, you’ve used positional parameters. In the following command the argument (c:\temp) is passed to the -Path parameter by position. The other option for passing a parameter would be to pass it by name like this: It makes sense for some commands to allow …

Continue reading ‘Specifying PowerShell Parameter Position’ »

Re-Thinking Positional Parameters

I mentioned in a previous post that I’ve recently changed my mind a bit about the Position parameter attribute. I guess technically it is the position parameter of the Parameter parameter attribute (i.e. there’s a parameter attribute called “Parameter” and it has a parameter called position). I don’t think you could come up with something …

Continue reading ‘Re-Thinking Positional Parameters’ »