Utility to determine account used for services throughout domain

  • Thread starter Thread starter stuartpwells@gmail.com
  • Start date Start date
S

stuartpwells@gmail.com

Guest
Im looking at changing an administrator account password, I know for
sure there are some servers out there using this account for services
startup. Other than going to each one and looking, does anyone know of
a utility to check what services are using the admin account or any
account throughout the entire domain?
 
RE: Utility to determine account used for services throughout domain

Save the text below in a file and make it .VBS

############
Dim oDomain
Dim oComputer

Dim oFSO, oFile , sDetails , sComputerName
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile("serv.txt")

Set oDomain = GetObject("WinNT://INSERTDOMAINNAMEHERE!!!!")

oDomain.Filter = Array("Computer")

For Each oComputer in oDomain
oComputer.Filter = Array("service")
For Each oService in oComputer
If oService.ServiceAccountName<>"LocalSystem" and
oService.ServiceAccountName<>"NT AUTHORITY\LocalService" and
oService.ServiceAccountName<>"NT Authority\NetworkService" and
oService.ServiceAccountName<>"NT AUTHORITY\NetworkService" Then
oFile.WriteLine oComputer.Name &" "& oService.ADsPath & " " &
oService.ServiceAccountName
End If
Next
Next
oFile.Close

WScript.Echo ("Terminou script p/ coleta de ctas de serviço!!!")
############

--
NetAdmin <São Paulo, BR>
"Das ist nicht mein bier... arschloch."
 
Back
Top