Need help in sorting out a data from my output, I want to show only a output saying ALL OK
when STATE
is RUNNING
, and NOT OK
if the STATE
is Faulted
(or any other string).
How can I achieve this?
Invoke-Command -ComputerName XXXXX,XXXX -ScriptBlock { hastatus -sum; VXPRINT -VPl } -credential XXXXX
Output:
-- SYSTEM STATE
-- System State Frozen
A XXXXXXXXXXXXX RUNNING 0
A XXXXXXXXXXXXX RUNNING 0