Something like this in PowerShell should get you started:
$Computers = Get-Content -Path "C:\temp\servers1.txt"
foreach ($Computer in $computers)
{
Get-Service | where {$_.Name -match "server" }|select name,status
}Christopher Bodnar Enterprise Achitect I, Corporate Office of Technology Tel 610-807-6459 3900 Burgess Place, Bethlehem, PA 18017 [email protected] The Guardian Life Insurance Company of America www.guardianlife.com From: Erik Goldoff <[email protected]> To: "NT System Admin Issues" <[email protected]> Date: 02/16/2012 10:13 AM Subject: utility to output service status Looking to run a batch/command on a series of servers, with the goal of a simple text file listing the service name and status (running/paused/stopped) to be emailed to a monitoring mailbox via scheduled task. PSService and SC seem a bit too verbose for this simple output, wondering if anyone has a favorite utility that might fit this need. Thanks in advance, Erik ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin ----------------------------------------- This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin
<<image/jpeg>>
