Unable to run Powershell script on Server.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to run Powershell script on Server.

    Hi,

    I have a dedicated server with Windows server 2008 R2 OS. I am unable to run the Powershell script and getting below error.

    "File C:\XXX.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details"

    Can you please look into this ?

    Regards,
    Rummy.

    #2
    Re: Unable to run Powershell script on Server.

    Hi Rummy,

    You just need to change the Windows PowerShell Script Execution Policy with the following command: set-executionpolicy remotesigned
    "It Takes 20 Years To Build A Reputation And Five Minutes To Ruin It. If You Think About That, You'll Do Things Differently. "

    Comment


      #3
      Re: Unable to run Powershell script on Server.

      Originally posted by PMagic View Post
      Hi Rummy,

      You just need to change the Windows PowerShell Script Execution Policy with the following command: set-executionpolicy remotesigned
      Hello PMagic,

      Thanks for your help.

      I have changed the execution policy to Unrestricted and when I execute Get-ExecutionPolicy from Powershell, it is showing "Unrestricted" now. But still I am getting the same error.. Please suggest.

      Regards,
      Rummy.

      Comment


        #4
        Re: Unable to run Powershell script on Server.

        Hello Rummy,

        Are you using Windows 2008 R2 ?

        If yes, then there is an x64 and x86 version of PowerShell and both have their own execution policies set. You will need to set the execution policy for X86 instance also.

        Navigate to the %windir%\SysWOW64\WindowsPowerShell\v1.0 and execute the "Set-ExecutionPolicy RemoteSigned" command.

        Thanks & Regards,
        Sarah

        Comment


          #5
          Re: Unable to run Powershell script on Server.

          Also note that this is a one time action & not needed to be performed every time.. Let us know if you face any further issues & we'll get this sorted out for you ASAP
          Rock _a.k.a._ Jack Daniel

          Follow eUKhost on Twitter || Join eUKhost Community on Facebook

          Comment


            #6
            Re: Unable to run Powershell script on Server.

            Originally posted by rummy View Post
            Hi,

            I have a dedicated server with Windows server 2008 R2 OS. I am unable to run the Powershell script and getting below error.

            "File C:\XXX.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details"

            Can you please look into this ?

            Regards,
            Rummy.
            Hello Rummy,

            You are getting an error becuase you are trying to execute the powershell script which is not create on the server where you are trying to execute. To execute the script you need to enable it using following steps.

            Right click on the script >> properties >> click on unblok.

            And then you will be able to execute the script

            Please check and let us know if you face any problem.


            Regards,
            Gareth Morgan.
            System Administrator
            eUKhost.com

            Comment

            Working...
            X