To un-publish expired/expiring certificates from TRUSTED_ROOTS VECS Store:
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>vecs-cli.exe entry list --store TRUSTED_ROOTS --text | more
Appliance:/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | less
Note: There could be several certificates to remove. Any expired and not in use certificates should be removed to avoid certificate related alarms.Alias : 2b724e6dd2####################c3369e2e7f
X509v3 Subject Key Identifier:
ED:CF:46:E5:CA:A6:##:##:##:##:##:##:##:##:2C:08:53:10:F9:18
Windows:This will output a list of certificates published to VMDIR.C:\Program Files\VMware\vCenter Server\vmafdd>dir-cli trustedcert list
Appliance:/usr/lib/vmware-vmafd/bin/dir-cli trustedcert list
C:\Program Files\VMware\vCenter Server\vmafdd>dir-cli.exe trustedcert list
Enter password for administrator@vsphere.local:
Number of certificates: 3
#1:
CN(id): EDCF46E5CAA6################2C085310F918
Subject DN: CN=CA, DC=vsphere, DC=local, C=US, ST=California, O=psc1, OU=VMware
CRL present: yes
#2:
CN(id): 72B1C4C56A1A################A29B78531ED0
Subject DN: CN=CA, DC=vsphere, DC=local, C=US, ST=California, O=psc2, OU=VMware
CRL present: yes
#3:
CN(id): 7AF0962806F5################DED4F853FF70
Subject DN: CN=CA, DC=vsphere, DC=local, C=US, ST=California, O=psc1, OU=VMware
CRL present: yes
EDCF46E5CAA6################2C085310F918
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>dir-cli trustedcert get --id EDCF46E5CAA6################2C085310F918 --login administrator@vsphere.local --password <PASSWORD> --outcert C:\temp\oldcert.cer
Appliance:/usr/lib/vmware-vmafd/bin/dir-cli trustedcert get --id EDCF46E5CAA6################2C085310F918 --login administrator@vsphere.local --password <PASSWORD> --outcert /tmp/oldcert.cer
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>dir-cli trustedcert unpublish --cert C:\temp\oldcert.cer
Appliance:/usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /tmp/oldcert.cer
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>dir-cli trustedcert list
Appliance:/usr/lib/vmware-vmafd/bin/dir-cli trustedcert list
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>vecs-cli entry delete --store TRUSTED_ROOTS --alias 2b724e6dd2####################c3369e2e7f
Appliance:/usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store TRUSTED_ROOTS --alias 2b724e6dd2####################c3369e2e7f
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>vecs-cli entry list --store TRUSTED_ROOTS --text | findstr Alias
Appliance:/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep Alias
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>vecs-cli force-refresh
Appliance:/usr/lib/vmware-vmafd/bin/vecs-cli force-refresh
Windows:C:\Program Files\VMware\vCenter Server\vmafdd>vecs-cli entry list --store TRUSTED_ROOTS --text | findstr Alias
Appliance:/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep Alias
Note:
WARNING: