Hello. I have a PowerShell script on several remote machines that I would like to execute with PSExec (Windows Remote Management is not an option). The script is on the E: drive. When I run the below command from my machine, I get this error Processing -file 'e:\copy.ps1' failed because the file does not have a '.ps1' extension. Specify a valid PowerShell script file name, and then try again.
psexec \\server1 cmd /c "echo . | powershell -file e:\copy.psl"
What am I missing?