Unable to retrieve alerts by command using get-alert for a particular ConnectorStatus
Forum » Operations Manager 2007 / General » Unable to retrieve alerts by command using get-alert for a particular ConnectorStatus
Started by: iamtulipiniamtulipin
On: 1238481179|%e %b %Y, %H:%M %Z|agohover
Number of posts: 1
rss icon RSS: New posts
Unable to retrieve alerts by command using get-alert for a particular ConnectorStatus
iamtulipiniamtulipin 1238481179|%e %b %Y, %H:%M %Z|agohover

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?

New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.