One of my Powershell scripts fails to this error message "PowerShell script error. An error occurred while creating the pipeline.". I can succesfully run the same script on quite many different server so there shouldn't be nothing wrong with the script. I'm using agent with impersonation for this. When I run the script locally it works fine.
Any idea what might be wrong here?