Automation

 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?