when I want to check a file info on all remote computers, I use below syntax to check it. Invoke-Command -Session $mypss -ScriptBlock {ls C:\screxxxtall\screxxtall.msi}
But it turns nothing, and the file does exist on individual computer. see my screenshot. what cause that problem?
I can actually reproduce this behaviour with PowerSehll version 7. On version 5.1 it works just as expected. But you can force PowerShell to return the objects with a Select-Object.