Hi,
I am trying to change a Runbook activity status to "Failed" in SCSM using the below command in SCSM:
Set-SCSMObject -SMObject $Object -Property Status -Value "Failed"
But I get the below error when I run it:
Set-SCSMObject : Unable to cast object of type 'System.String' to type 'Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject'.
Does anyone know how to fix it or what is wrong with that code block?
Any help will be appreciated.
Thanks