I am trying to pipe into powershell commands that I am dynamically retrieving. So for example, if I get this command object
$ls = Get-Command 'Get-ChildItem'
How do I pipe anything to it?
I have tried:
'.\' | $ls
but I get an error that Expressions are only allowed as the first element of a pipeline
.