Unable to retrieve alerts by command using get-alert for a particular ConnectorStatus
I am working SCOM command shell API. However, I am unable to retrieve alerts by command using get-alert for a particular ConnectorStatus. For ex. for a particular alert the value of ConnectorStatus is 'NotMarkedForForwarding' but when I execute the following command - get-alert -criteria {ConnectorStatus = 'NotMarkedForForwarding'} I get the following error:
Get-Alert : Conversion failed when converting the nvarchar value 'NotMarkedForForwarding' to data type int.
The issue here is that the API is expecting some int value for ConnectorStatus instead of the visible string value. Does anyone has any idea where I can get the exact mapping of these text to int values?





