Enumerate computer accounts
Find Computers in my domain.
Dim oDomain
Dim strDomainName
Dim oComputer
strDomainName = InputBox("Please type the name of the domain")
Set oDomain = GetObject("WinNT://" & strDomainName)
oDomain.Filter = Array("Computer")
For Each oComputer in oDomain
Wscript.Echo oComputer.Name
Next
|