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.
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
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.
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
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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
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?