Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

How can I check custom "status" field changes in a PS script output?

$
0
0

I have a script checking printers through WMI. The output looks like this:

Name Status

---- ------

Xerox wc275.1 Offline

dnj-4000.1 Offline

How can I check if the "status" field changes and HOW MUCH TIME printer was in this status? Its really important to know how much time printer was in current "status" to send an email notifications later. Like "offline more than 30 minutes --- email, paper jam more than 15 minutes --- email".



Viewing all articles
Browse latest Browse all 15370

Trending Articles



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