PowerCLI

 View Only
  • 1.  "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Jan 27, 2020 04:45 PM

    First question I guess - do I even need to load the module? I've confirmed at least one works w/o it.

    If so...

    After moving my automation scripts to a newly built Win 2016 server with (PowerCLI 11.5.0 build 14912921) I noticed that everything was taking much longer than before. After digging in I saw that it was "Import-Module VMware.PowerCLI" that was causing the problem. Digging deeper with Proc Explorer, I see that trying to talk to Akamai... I assume looking for module updates?? Well this server has no internet access.



  • 2.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Jan 27, 2020 04:51 PM

    Try removing the Import-Modue lines, as of Powershell 3.0 I think modules will be automatially loaded if they are installed in the standard locations like Powercli does now.



  • 3.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Jan 27, 2020 05:09 PM

    PowerShell doesn't look automatically for module updates unless you have the Update-Module somewhere in a profile.

    This might be a timeout while checking the certificates that secure the PowerCLI modules.
    See for a similar (older) issue Re: PowerCLI very slow to load on a Windows 2012R2 Server



  • 4.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai
    Best Answer

    Posted Jan 27, 2020 05:39 PM

    Thank you LucD. I truly appreciate the help your provide the community!

    The following change the load time from 5 minutes to 8 seconds!

    - Open "Internet Options" in the Control Panel or Internet Explorer

    - Click the "Connections" tab

    - Set proxy to 127.0.0.1

    - Click the "Advanced" tab

    - Scroll down to "Security"

    - UNcheck "Check for publisher's certificate revocation"

    - UNcheck "Check for server certificate revocation"

    - Click OK



  • 5.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Jan 24, 2024 03:59 PM

    Unfortunaletly, most of the setting you suggest to be disabled are enforced by policies setup by security team (and for good reasons at that!)

    Can you provide an alternative?



  • 6.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Oct 21, 2024 04:52 AM
    LucD - san
     
    We asked the question (*1) and found that the following workarounds are effective:
     
    - UNcheck "Check for publisher's certificate revocation"
     
    - UNcheck "Check for server certificate revocation"
     
    We would like to know if this workaround is described in VMware documentation. If so, can you tell me the VMware document where it is described?
     
    (*1)
    https://community.broadcom.com/vmware-cloud-foundation/question/when-we-run-the-powercli-connect-viserver-command-it-takes-about-1-minute-and-40-seconds-to-execute



  • 7.  RE: "Import-Module VMware.PowerCLI" Takes 5 Minutes & Taking to Akamai

    Posted Oct 21, 2024 07:47 AM

    Afaik it is not mentioned explicitly in the PowerCLI documentation.

    It was mentioned in some older PowerCLI threads on here, but since the VMTN migration to this new (Broadcom) platform, it is hard, if not impossible, to find old threads.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------