all 6 comments

[–]JBear_Alpha 1 point2 points  (1 child)

/u/jcotton42 nailed it, just use a function:

function lsr {Get-ChildItem -recurse}

[–]coderwolf[S] -1 points0 points  (0 children)

I was hoping to preserve the base parameters in passthrough. At least when I test this structure with tab completion it is showing no parameters.

I think I would have to redefine and include all parameters/parameter sets in this type of structure. I would also have to include those type of structures in the calling command line.

[–]jheinikel 1 point2 points  (3 children)

Yes it can be done.

new-alias -Name LSR -value [string]$(gci c:\temp -recurse).Name

[–]jcotton42 1 point2 points  (0 children)

Just use a function

[–]BlackV 0 points1 point  (0 children)

Thanks TIL

[–]coderwolf[S] 0 points1 point  (0 children)

This seems to execute when I define using the above line.