To list all license keys installed on vCenter:
Get-VMLicense
This returns Key, Name (e.g., vSphere 7 Enterprise Plus), and Total (number of available CPU licenses).
If you need to remove a specific license and revert the host to Evaluation Mode (60 days), the vim-cmd does not have a direct "remove" switch. Instead, you typically re-apply the evaluation mode logic or re-install.
However, you can decode the current license status:
vim-cmd vimsvc/license --decode
This is useful if you are moving a license key from one host to another and need to free it up.
esxcli software license remove --license-key="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
For Windows/Linux with VMware PowerCLI installed, combine commands:
Connect-VIServer -Server vcenter.domain.com