If you did an offline install, you may need to grab the package files from an online machine. Otherwise, you may have come across a warning error about an existing instance of power CLI when you go to run the main install cmdlet.
When I first went to run this, it told me the version would be installed “side-by-side” with my old version. Oh yeah, I forgot I did that…
Alright, so I use the force toggle, and it fails again… Oi…
Lucky for me the world is full of blogger these days and someone else had also come across this problem for the exact same reason.
If you want all the nitty details check out their post, the main part I need was this one line, “This issue can be resolved deleting modules from the PowerShell modules folder inside Program Files. Once the modules folder for VMware are deleted try installing modules again, you can also mention the modules installation scope.”
AKA, Delete the old one, or point install to other location. He states he needed the old version but doesn’t specify for what. Anyway, I’ll just delete the old files.
So, at this point I figured I was going to have a snippet of a 100% clean install, but no, again something happened, and it is discussed here.
If I’m lucky I will not need to use any of the conflicting cmdlets and if I do; I’ll follow the suggestions in that thread.
OK let’s move on. Well, the commands were still not there, looks this has to succeed, and there’s no prefix option during install only import, which you can only do after install, the other option was to clobber the install. Not interested, so I went into Windows add/remove features, and removed the PowerShell module for Hyper-V. No reboot required, and the install worked.
the Hyper-v MMC snap in still works for most of my needs. Now that I finally have the 2 required pre-reqs in place.
Step 2a) connect to server via Power CLI
Why did this happen?
A: Cause self signed certificate on vCenter, and system accessing it doesn’t have the vCenter’s CA certificate in its own trusted ca store.
How can it be resolved?
A: Option 1) Have a proper PKI deployed, get a proper signed cert for this service by the CA admin, assign the cert to the vCenter mgmt services. This option is outside the scope of this post.
Option 2) Install the Self Sign CA cert into the machine that’s running PowerCLI’s machine store’s trusted CA folder.
Option 3) Set the PowerCLI parameter settings to prompt to accept untrusted certificates.
I chose option 3:
Make sure when you set your variable to use single quotes and not double quotes (why this parameter takes system.string instead of secureString is beyond me).
While I understand the importance of PowerShell for scripting and automation and mass deployment situations, requiring it to apply a single toggle setting is a bit redic, take note VMware; Do better.