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".