you could also use WMIQuery()

Something like:
$arrSvcName = WMIQuery('Name','Win32_Service',$computer,'State','Running')
For each $item in $arrSvcName
? $item
next
_________________________
How to ask questions the smart way <-----------> Before you ask