Asked By ian_
25-Jul-07 07:14 AM

Thanks for the help, this is what I ended up with:-
$c1 = new-object System.Diagnostics.PerformanceCounter("MSExchangeTransport
SmtpReceive","Messages Received Total","from POP3 forwarder")
$c2 = new-object System.Diagnostics.PerformanceCounter("MSExchangeTransport
SmtpSend","Messages Sent Total","to internet")
$c3 = new-object System.Diagnostics.PerformanceCounter("MSExchangeTransport
SmtpReceive","Bytes Received Total","from POP3 forwarder")
$c4 = new-object System.Diagnostics.PerformanceCounter("MSExchangeTransport
SmtpReceive","Message Bytes Received Total","from POP3 forwarder")
$c5 = new-object System.Diagnostics.PerformanceCounter("MSExchangeTransport
SmtpSend","Message Bytes Sent Total","to internet")
$c1, $c2, $c3, $c4, $c5 | ft CounterName, RawValue -Autosize
Works fine, though I assume someone will be along in a minute with something
shorter and more elegant.
I am having issues with the System Up Time counter in that it doesn't change.
$a = new-object System.Diagnostics.PerformanceCounter("System","System Up
Time")
$a.RawValue
Produces a static value ?
Ian