Install Brew
- Install powershell via Brew
- If you do not have Brew installed you can follow the instructions on Brew’s Website
- Or….
- open a terminal window on Mac
- Run:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- If you do not have a terminal window open, open one up!
- Install powershell via brew
- run:
brew cask install powershell
- After Power Shell is installed
- Run powershell
Install PowerCLI
- Install PowerCLI
- Run:
Install-Module -Name VMware.PowerCLI -Scope CurrentUser
-
> Install-Module -Name VMware.PowerCLI -Scope CurrentUser
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running
the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
- If you do not have a signed certificate, then you might want to run this…
Install PowerNSX
- Run:
Install-Module PowerNSX
-
> Install-Module PowerNSX
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the
modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
Connect to your NSX via vCenter
- Run:
Connect-NsxServer -vCenterServer <vcenterFQDN>
> Connect-NsxServer -vCenterServer labVcenter.foo.com
PowerShell credential request
vCenter Server SSO Credentials
User: username
Password for user username: *********
Version : 6.3.5
BuildNumber : 7119875
Credential : System.Management.Automation.PSCredential
Server : 10.0.0.10
Port : 443
Protocol : https
UriPrefix :
ValidateCertificate : False
VIConnection : labVcenter.foo.com
DebugLogging : False
DebugLogfile : \PowerNSXLog-username@-2019_03_07_14_55_38.log