In one of my project, I need to check whether the event log "Microsoft-Exchange-ManagedAvailability/Monitoring" exists on the machine (event source is ManagedAvailability).
I used
EventLog.Exists("Microsoft-Exchange-ManagedAvailability/Monitoring")
and
EventLog.SourceExists("ManagedAvailability")
Both returns false, but the event log does exist. It is under "applications and services logs"/Microsoft/ , see screen shot.
So, how can I check whether this log exists?
Thanks