## p4get-counters ## aaron bockelie function p4get-counters { $servercheck = p4get-server if ($servercheck.pingsuccess.equals($true)) { $counters = new-object pscustomobject foreach ($counter in (p4get counters)) { add-member -inputobject $counters -membertype NoteProperty -name $counter.counter -value $counter.value -force } $counters.lastCheckpointAction = convertUnixTime $counters.lastcheckpointaction.Split(" ")[0] $counters } }