Windows Vista Forums

using powershell via rsh fails with execution of scripts is disab

  1. #1


    jefff Guest

    using powershell via rsh fails with execution of scripts is disab

    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$


      My System SpecsSystem Spec

  2. #2


    Jeffery Hicks [MVP] Guest

    Re: using powershell via rsh fails with execution of scripts is disab

    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$
    >

      My System SpecsSystem Spec

using powershell via rsh fails with execution of scripts is disab

Similar Threads
Thread Forum
Command line execution in Powershell
I've written a script to build parameters to pass to a command that will be executed via the command line. The trouble I'm having is finding a...
PowerShell
Executing PowerShell Scripts with IIS
Hello, we would like to write a frontend website to manage some of our Exchange Server's administrative tasks (we manage Exchange Server 2007 via...
PowerShell
run PowerShell scripts from ASP or asp.net
Hello! is possible to run PowerShell scripts from ASP or asp.net and get the result? Thanks
PowerShell
Powershell scripts not working with Vista powershell
Hi, I am still in the process of learning Powershell and I am in the middle of my transition from windows XP to Vista.. I was trying to run one...
PowerShell
Can't run powershell scripts
When I try to run a powershell script I get the following error: File c:\scripts\foo.ps1 cannot be loaded. The form specified for the subject is...
PowerShell
Powershell and Logon Scripts
Over the months, i've heard alot of people talk about the issue with powershell and logon scripts, and no support for it. I'd like to get those...
PowerShell
powershell logon scripts
I'm trying to set up a powershell script as a logon script in group policy. The script resides in a policy directory, and so has a directory name in...
PowerShell