Restart-Service MSExchangeIS -Force iisreset
Set-ExchangeServer -Identity "YourServerName" -ProductKey XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Use code with caution. exchange 2019 product key invalid
Note: This may require rearm/activation of the OS licensing as well. Proceed with caution and only if other steps fail. exchange 2019 product key invalid
Set-ExchangeServer -Identity "YourServerName" -ProductKey "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" Use code with caution. exchange 2019 product key invalid
catch Write-Error "FAILED: The key was rejected by the licensing engine." Write-Host "Specific Error: $($_.Exception.Message)" -ForegroundColor Red