SAPIENScripter
Posts: 100
Score: 0 Joined: 5/15/2007 From: SAPIEN Technologies Status: offline
|
Use the Get-WMIObject to get service objects. Since you only want a particular service, you would use something like this: get-wmiobject win32_service -computername SERVER01 -filter "name='spooler'" | Select SystemName,State To process a text list of computers, get-content servers.txt | foreach { get-wmiobject win32_service -computername SERVER01 -filter "name='spooler'" | Select SystemName,State }
_____________________________
Jeffery Hicks Microsoft MVP - Windows PowerShell http://blog.SAPIEN.com coming soon: Managing Active Directory with Windows PowerShell: TFM followme: http://www.twitter.com/jeffHicks
|