Quite simply:
> powershell.exe -command "& '\\RemoteServer\c$\My Script.ps1'"
does not work at all. My Script.ps1 opens in Notepad, nothing more. Meanwhile,
> powershell
PS > &"\\RemoteServer\c$\My Script.ps1"
works just fine (the script executes).
I did have to use the caspol tool, since my script relies on a binary module, but I don't see how that could be the issue.
Any thoughts as to the cause of this issue?
Thanks!