Home > Blogs > VMware PowerCLI Blog


Does PowerCLI hang when loading? Check to see if Windows is the culprit!

Over the past few months, we’ve heard of several customers who were experiencing issues where the PowerShell window would hang for about 30 seconds with a black screen before allowing the customers to use the console. If you are experiencing similar symptoms, read on.

Check your Group Policy

There is a Group Policy setting that will automatically try to update certificates in the Microsoft Root Certificate Program. This will try to connect to an external site to try to update the certificates. If your corporate firewall or other network configurations do not allow your machine to hit these sites, the PowerShell console will hang until it times out, which will give you the result above.

To check this setting, open up your group policy settings:

  1. Go to Run
  2. type ‘gpedit.msc’
  3. hit ‘enter’

Navigate through the group policy editor:

Computer Configuration > Windows Settings > Security Settings > Public Key Policies

Double-Click on “Certificate Path Validation Settings”

Group Policy

Select the “Network Retrieval” tab and see if “Automatically update certificates in the Microsoft Root Certificate Program” is checked. If it is, uncheck the box and click ‘Ok’.

Certificate-Path-Validation-Settings_thumb.png

Once you’ve followed the previous steps, open your PowerCLI console again and see if your problems have been solved.

PowerCLI.png

This entry was posted in General and tagged , , , on by .
Brian Graf

About Brian Graf

Brian Graf is a well-known VMware evangelist in the IT community. Over the past 5 years, Brian has done Technical Marketing for PowerCLI Automation and ESXi Lifecycle, Product Management of vCenter Distributed Resource Management features (DRS & HA), and is currently working as a Technical Marketing Manager for VMware Cloud on AWS. Brian is a co-author of the PowerCLI Deep Dive 2nd edition book. He has helped develop VMware certification courses and exams and presents around the world at VMware User Conferences, AWS Summits, Interop, as well as other industry Conferences. Brian is also a Microsoft MVP.

3 thoughts on “Does PowerCLI hang when loading? Check to see if Windows is the culprit!

  1. LucD

    Nice article Brian.

    Just one question, aren’t you ignoring a bit lightly why this happens ?
    Certificates do serve a purpose!
    Shouldn’t people be advised to use “real” certificates for their vSphere environment?

    And you might want to add a note to check if the GPO that is being changed is perhaps used by many other hosts in the domain.
    Where disabling the option might introduce other side effects.

    But like I said earlier, great article, clear and concise.

    Reply
    1. Brian GrafBrian Graf Post author

      Thanks Luc,
      you are correct that this is a greater issue than what I state here. In reality, if this is a certificate/GPO issue then the issue lies with the corporate policies and should be address with the corresponding people within the organization.

      I guess what I was trying to get across, along with a quick bandaid, is that PowerCLI has been improving its performance and startup speed when loading the console, and that if people are still seeing slowness, the likelihood of it actually being PowerCLI is quite minimal.

      Hopefully those who are looking at changing the GPO would do so at a personal PC level rather than propogating the change across the network, especially without a Change Request and following corporate policies for updating their environment 🙂

      Reply
  2. Shekhar Joshi

    Nice article. The hang usually happens when the PowerCLI machine has no internet connectivity. By default I guess PowerCLI may be calling some utility to update the root certificates and revocation list. Hence the issue. Earlier I used to do something similar by disabling the update of root certificates and revocation lists in IE advanced setting.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*