Passing a scriptblock through pipeline

Viewed 1360

Can I pass a scriptblock through the pipeline? For example, instead of

Invoke-Command -ScriptBlock {Get-Job}

Can I do (conceptually) the following?

{Get-Job} | Invoke-Command -ScriptBlock $_
1 Answers
Related