Situation: The client is running Microsoft System Center 2019 trail version. It has been expired. When they
try to install the license running this PowerShell command: Set-SCOMLicense – ProductID,
they get this message:
Set-SCOMLicense – ProductID `xxxxx-Xxxxx-xxxxx-3xxxx-8xxxY’
mgmtsvr03
. Cannot convert the “xxxxx-Xxxxx-xxxxx-3xxxx-8xxxY” value of type
“System.String” to type “System.Management.Automation.PSCredential”.
At line:1 char:29
Resolution: since the trail version expired, please save the following lines as a .ps1 file and execute the file in the scom server.
Set-Date -Date (Get-Date).AddDays(-365)
import-module operationsmanager
New-SCOMManagementGroupConnection
Set-SCOMLicense -ProductId "xxxxx-Xxxxx-xxxxx-3xxxx-8xxxY"