If you want something that can enumerate servers, well, I don't have
that. But for one server at a time...
strComputer = "." ' change to server name or take as
wscript.arguments(0)
strAccount = ".\netsvc" ' must be in lower case
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service")
For Each objservice in colServiceList
If Lcase (objService.Startname) = strAccount Then
wscript.echo objService.DisplayName
'errReturn = objService.Change( , , , , , , , "password")
End If
Next
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kern, Tom
Sent: Monday, March 29, 2004 11:38 AM
To: ActiveDir (E-mail)
Subject: [ActiveDir] Services script
Is there a vb or perl script I can run on my network to enumerate all
the services that run under a specfic account on my servers?
I'm running a win2k AD network.
Thanks alot
List info : http://www.activedir.org/mail_list.htm
List FAQ : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info : http://www.activedir.org/mail_list.htm
List FAQ : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/