Cmdlet cannot read from a path because it is running remotely. You can provide input by using byte stream. For example: Get-Content ...