$_ only has meaning on your local computer. When the Script Block gets to the remote machine, $_ has no meaning. Look at the "Remote Variables" topic in The Big Book of PowerShell Gotchas, linked from our eBooks menu, for alternate approaches. The examples in the help for Invoke-Command also have examples, albeit with a bit less explanation than the book.
The topic ‘piped value in Invoke-Command’ is closed to new replies.