Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rebelinux opened this issue Jul 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working in progress Assignee is currently focusing on this issue

Comments

@rebelinux
Copy link
Contributor

$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.

@tpcarman tpcarman self-assigned this Jul 24, 2022
@tpcarman tpcarman added the in progress Assignee is currently focusing on this issue label Jul 24, 2022
tpcarman added a commit that referenced this issue Jul 25, 2022
- Add vCenter Resource Summary ([Fix #97](#97))
- Add vCenter Machine SSL Certificate information ([Fix #98](#98))
@tpcarman tpcarman added the bug Something isn't working label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress Assignee is currently focusing on this issue
Projects
None yet
Development

No branches or pull requests

2 participants