Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to add a paremeter and output to file

Status
Not open for further replies.
Jul 27, 2004
397
US
The below script will scan the local pc and look at all services and the account they run as. I need to make a couple of changes. I need to point this at a subnet and scan all servers. I also need the results output to a file. Can someone help me with this. I am not good with scripting.




strComputer = "domain.fma.com"
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService.ExecQuery _
("Select * From Win32_Service")
For Each objService in colServices
Wscript.Echo objService.Name, objService.StartName
Next

Network Admin
A+, Network+, MCSA 2000, MCSE 2000
MCSA (2003)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top