Skip to content

Machine SSL certificate information not working using the vcenter IP address as -Target #98

@rebelinux

Description

@rebelinux

$VCenterMachineCert = ($VIMachineCertificates).Where{ ($_.EntityType -eq 'VCenter') -and ($_.Entity.Name -eq $($vCenterServerName)) }

If the report is generated using the vcenter ip address as -Target the $_.Entity.Name is equal as the IP instead of the vcenter FQDN

PS /home/rebelinux> $VIMachineCertificates = Get-VIMachineCertificate -Server  192.168.5.2   
PS /home/rebelinux> $VIMachineCertificates 

Entity                         Subject                        Issuer                         NotValidAfter
------                         -------                        ------                         -------------
192.168.5.2                    vcenter-01v.pharmax.local      pharmax-SERVER-DC-01V-CA       1/25/2024 8:33:…
esxsvr-00f.pharmax.local       esxsvr-00f.pharmax.local       vcenter-01v                    5/21/2025 11:50…
comp-02a.pharmax.local         comp-02a.pharmax.local         vcenter-01v                    5/28/2026 8:35:…
comp-01a.pharmax.local         comp-01a.pharmax.local         vcenter-01v                    5/31/2026 11:45…

PS /home/rebelinux> $VIMachineCertificates.Entity.Name                                    
192.168.5.2
esxsvr-00f.pharmax.local
comp-02a.pharmax.local
comp-01a.pharmax.local
PS /home/rebelinux> 

Target as IP:
Machine_Certificate_by_Vcenter_IP

Target as FQDN:
Machine_Certificate_by_Vcenter_FQDN

Target as FQDN Report:
Vcenter_Certificates

If a fix is not possible, it would be a good idea to update the documentation to state that the FQDN of the vcenter should be used.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingin progressAssignee is currently focusing on this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions