Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

PowerShell look up table

$
0
0

Hi

I am looking to automate some SCOM daily alert reports and the basic powershell is straight forward.  

get-scomalert -criteria "ResolutionState <> 255" | Select Name, MonitoringObjectPath , ResolutionState

The drawback is that the resolution state displays as a number rather than as the associated text. This means that I need to do a lookup of some description e.g. the following will list the resolution state ID and the Name.

get-scomalertresolutionState | select ResolutionState, Name

How do I get the name from the second command into the select statement from the first command?

Thanks in advance for your help.



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>