I am not a big PowerCLI user, primary reason being that I don’t even have a Windows box available. My main laptop is a macbook, and I don’t run Windows anywhere. Yesterday PowerCLI 10.0.0 was released, which includes support for OSX! Before you can install PowerCLI of course you would need to have Powershell running, I tried different ways as described here, but the Homebrew method threw an error (see below) so I used the direct download option and just installed the package, which worked fine.
failed command: /usr/bin/sudo -E -- /usr/sbin/installer -pkg /usr/local/Caskroom/powershell/6.0.1/powershell-6.0.1-osx.10.12-x64.pkg -target
When installed you simply open a terminal and type “pwsh”. Weird thing is that many blogs seem to state that you type “powershell”, but for me that doesn’t work either. So either recently something changed, or people have been blatantly copying procedures from the same source, didn’t bother checking why… waiting for Alan to comment. Then you type the following in the Powershell to get the PowerCLI module installed:
Install-Module -Name VMware.PowerCLI -Scope CurrentUser
What may be useful to change is the certificate handling. As mentioned by Kyle in this blog, the way PowerCLI handles certificate issues has changed, so go to his blog to figure out how to disable it. I will now go explore some of the vSAN PowerCLI cmdlets, haven’t done anything in ages with PowerCLI, so this will be a day with me yelling at the monitor why stuff doesn’t work and then realizing I made a stupid typo.