VMware vSphere

 View Only
  • 1.  Issue installing Powercli through powershell

    Posted Apr 10, 2018 12:34 PM

    Got this working on my own windows 10 laptop

    Having issues getting it working onsite, they use a proxy

    So i used the old msi (build VMware-PowerCLI-6.5.0-4624819) and that worked until today

    I now get the error message

    . : File C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1 cannot be

    loaded because its operation is blocked by software restriction policies, such as those created by using Group Policy.

    At line:1 char:3

    + . "C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Init ...

    +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : SecurityError: (:) [], PSSecurityException

        + FullyQualifiedErrorId : UnauthorizedAccess

    Tried below link and changed it to unrestricted and its still the same

    PowerCLI: “Initialize-PowerCLIEnvironment.ps1 cannot be loaded because the execution of scripts is disabled on this syst…

    Any ideas on how best to get this working again? I think they may have created a policy so its not in use here but wanted to do my own checking first



  • 2.  RE: Issue installing Powercli through powershell

    Posted Apr 14, 2018 05:10 PM

    It looks like a GPO issue which is being enforced and then inherited by this machine. You'd need to check with the AD admin to see what is being linked here.



  • 3.  RE: Issue installing Powercli through powershell

    Posted Apr 15, 2018 05:38 AM

    Hi,

    Please make sure the powershell Execution Policy has been set properly on your system (Set-ExecutionPolicy ), Also please note that there are 2 versions of powershell on system (32 and 64bit) and each has it's own Execution policy. You can check the current policy with Get-Executionpolicy command in powershell.