Impossible to create aliases for cmdlets to be called with parameters
It is not possible to create an alias that calls a cmdlet (or function) with a parameter. An alias can only refer to the name of a
command.
In the following example, the text get-childItem -recurse
is understood as the name of a cmdlet (which most probably won't exist):
PS C:\> set-alias gcir 'get-childItem -recurse'
gcir: The term 'get-childItem -recurse' is not recognized as a name of a cmdlet, function, script file, or executable program.
PS C:\> gcir
A workaround for this limitation(?) is to create a
function.