/usr/lib/vmware-vmafd/bin/dir-cli trustedcert get --id [id] --login administrator@[domain name] --password <PASSWORD> --outcert /tmp/oldcert.cer
vCenter Server 8.x
Internally, both the command and the script mentioned above output certificate information to a temporary file at /tmp/oldcert.cer. If the operation is re-executed while this file already exists, the process fails and results in the "Verify account has proper administrative privileges. 5" error.
Before re-executing the script, delete the temporary output file /tmp/oldcert.cer by running the "rm /tmp/oldcert.cer" command.