Powershell: Get SHA256 Thumbprint from vCenter server using Powershell Core. (NSX-T Compute Manager Registration related)
Summary:
Had a need to pull a target vCenter's SSL certificate and convert it's thumbprint to SHA256 format to register to NSX-T Manager using Powershell core. Servicepoint was not available in Core.
Noticed also recently Lam updated his approach to take Core into account. My approach is slightly different and my script will also return the certificate object back if you so choose rather than just the SHA256 value. Anyway, I've tested in PS Core 6.0.4 and 6.1 on Ubuntu, CentOS, and MacOS and my function seems to work fine. Let me know if you see otherwise.
GIST below:
Had a need to pull a target vCenter's SSL certificate and convert it's thumbprint to SHA256 format to register to NSX-T Manager using Powershell core. Servicepoint was not available in Core.
Noticed also recently Lam updated his approach to take Core into account. My approach is slightly different and my script will also return the certificate object back if you so choose rather than just the SHA256 value. Anyway, I've tested in PS Core 6.0.4 and 6.1 on Ubuntu, CentOS, and MacOS and my function seems to work fine. Let me know if you see otherwise.
GIST below:
Comments
I am in a learning curve of PowerShell, if you don't mine can you please walk me through how to use this script.
Thanks for understanding.