1. Uninstall PowerCLI from VMware (we add it later from PSGallery)
  2. Start Powershell
  3. Set tls security to 1.2
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  4. Set http proxy
    [Environment]::SetEnvironmentVariable("HTTP_PROXY", "proxy.invid.se:3128", [EnvironmentVariableTarget]::Machine)
  5. Set https proxy
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", "proxy.invid.se:3128", [EnvironmentVariableTarget]::Machine)

Now that we have internet connection you can try in powershell, just for confirmation.

wget https://invid.se

Now it is time to register PSgallery

Register-PSRepository -Default -Verbose

If you trust Microsoft the set the Gallery to Trusted.

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted

List your repo

Get-PSRepository

Powershell1Now it is time for VMware Stuff

Get-Module VMware.* -ListAvailable

Powershell

Install VMware Powercli, I am running linux so I do not think -scope work…

Install-Module -Name VMware.PowerCLI

If you trust your certificates the ignore if it bulitin cert

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

To update your VMware.PowerCLI

Update-Module -Name VMware.PowerCLI