Vcenter License Key Command Line May 2026

If a license expires and blocks new operations:

Get-VMLicense | Where-Object $_.Expiration -lt (Get-Date) | Remove-VMLicense -Confirm:$false

If you need to remove a license key:

$licenseKey = "LicenseKeyToRemove"
$licenseAssignment = Get-LicenseAssignment | Where-Object $_.LicenseKey -eq $licenseKey
Remove-LicenseAssignment -Id $licenseAssignment.Id

Using the vSphere Command-Line Interface (vCLI) vcenter license key command line

While PowerCLI is more versatile and widely used, the vCLI also offers functionalities for managing licenses, albeit with a different set of commands: If a license expires and blocks new operations:

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. If you need to remove a license key:

However, you can decode the current license status:

vim-cmd vimsvc/license --decode

To see the currently applied license and features:

vim-cmd vimsvc/license --show