Using Positional Cmdlet Parameters

by Oct 28, 2009

Cmdlets typically support a lot of parameters. For convenience, the most important ones have an assigned "position" so you can specify them without a parameter name, as long as you specify positional parameters in the correct order. This is why this line works:

dir $env:windir\system32 *.dll

Without positional parameters, you would have to always specify the parameter:

dir -path $env:windir\system32 filter *.dll

Twitter This Tip! ReTweet this Tip!