Hello
I want to find the friendly display name (e.g. as it appears in the SCOM console) of a Discovery from its Id.
for example I see an event in like the following (Server and Domain name changed)
----------------------------------------------------------------------------------------------------------------------------------------------------------
Description: Event Description: Discovery data couldn't be inserted to the database. This could have happened because of one of the following reasons:
- Discovery data is stale. The discovery data is generated by an MP recently deleted.
- Database connectivity problems or database running out of space.
- Discovery data received is not valid.
The following details should help to further diagnose:
DiscoveryId: 4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3
HealthServiceId: 89a639fc-f7b3-e8a8-6d7d-7a963ec641ba
Invalid monitoring class id specified in the discovery data item.
MonitoringClassId: e47f4f14-bcc3-b14a-7c2f-beeef3469412
RuleId: 4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3
Instance:
<?xml version="1.0" encoding="utf-16"?><ClassInstance TypeId="{e47f4f14-bcc3-b14a-7c2f-beeef3469412}"><Settings><Setting><Name>{5C324096-D928-76DB-E9E7-E629DCC261B1}</Name><Value>Server1.MyDomain.Com</Value></Setting><Setting><Name>{D0945C76-08A8-2699-A390-40994A1E0B7D}</Name><Value></Value></Setting><Setting><Name>{20D61342-1CEB-1971-61B7-3CC49062D134}</Name><Value></Value></Setting><Setting><Name>{1A4D6620-FADD-CF98-6950-22A1CAA65FE7}</Name><Value></Value></Setting><Setting><Name>{AFB4F9E6-BF48-1737-76AD-C9B3EC325B97}</Name><Value>Server1</Value></Setting></Settings></ClassInstance>.
----------------------------------------------------------------------------------------------------------------------------------------------------------
So taking the Discovery is as above
DiscoveryId: 4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3
I tried using the SCOM PowerShell console like so
get-discovery -criteria "Id -eq "4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3"
I see Id is of Type GUID therefore I changed the above to the following
get-discovery | where {($_.Id).ToString() -eq "4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3"}
and
get-discovery | where {($_.Id).ToString() -match"4c333e9b-8eb9-2a03-c4ed-97f2f3f89fe3"}
No luck, can someone please tell me how to achieve this please, so I can take a closer look at the discovery
Thank you
AAnotherUser__
AAnotherUser__