You'll have to set the execution policy on the remote machine to allow
scripts. Because you are using rsh, you are running scripts on the remote
server.
BTW, I would recommend at least using RemoteSigned and not Unrestricted.
The former will keep any Internet downloaded scripts, which might not get
vetted by you, from being executed.
--
Jeffery Hicks
Microsoft PowerShell MVP
http://www.scriptinganswers.com http://www.powershellcommunity.org
Now Available: WSH and VBScript Core: TFM
Coming Soon: Windows PowerShell: TFM 2nd Ed.
"jefff" <jefff@xxxxxx> wrote in message
news:7F3EEB2D-3602-4DDD-AE20-E331D62B3832@xxxxxx
> Guys,
>
> I know this is a strange request, but I need to rsh to start my
> powershell scripts. My scripts work fine locally.
> I have unrestriced access, But when I attempt to rsh the powershell
> command,
> they fail. I have even tried signing the scripts but they fails.. This
> system is x64 if
> that matters..
>
> PS C:\> get-executionpolicy
> Unrestricted
> PS C:\>
>
>
>
> bash-2.03$ 'rsh' '172.17.226.119' ' cmd /c
> c:\\windows\\Syswow64\\WindowsPowerShell\\V1.0\\powershell.exe
> -Command z:\\smebackup_loop.ps1 -Force <c:\\testtools\\yes.txt '
> File Z:\smebackup_loop.ps1 cannot be loaded because the execution of
> scripts
> is
> disabled on this system. Please see "get-help about_signing" for more
> details.
> At line:1 char:23
> + z:\\smebackup_loop.ps1 <<<< -Force
> bash-2.03$
>