Aqui está um script VBS, adaptado desta página (procure por "lista Domínio, computador e IP de todos os computadores no AD "):
' Modify these vars to match your enviroment
' requires Windows 2003 DNS
strDomain = "MyWindowsDomain" ' Windows Domain NetBIOS Name
strDNSSVR = "DNSserver" ' DNS Server's name or IP
strDNSDomain = ".mydomain.com" ' Note the . at the beginning!
strFILENAME = "AD-Computers.txt" ' Output File Name
'------------------------------------------------
'
' File stuff
Dim filesys, testfile
Set filesys = CreateObject("Scripting.FileSystemObject")
Set OUTfile= filesys.CreateTextFile(strFILENAME, True)
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name, Location from 'LDAP://" & strDomain & "' " _
& "Where objectCategory='computer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
'debug stuff Comment if you want to see it during execution
'Wscript.Echo "My DNS Server is: " & strDNSSVR
'Wscript.Echo "My Windows Domain is: " & strDomain
'Wscript.Echo "My DNS Suffix is: " & strDNSDomain
'Wscript.echo "Writing output to File: " & strFILENAME
'output
Do Until objRecordSet.EOF
strHOST = objRecordSet.Fields("Name").Value
strHOSTFQDN = strHOST & strDNSDomain
strIP = GetIPFromDNS(strHOSTFQDN,strDNSSVR)
OUTfile.WriteLine strDomain & " " & strHOST & " " & strIP
'Comment line below to not dump output to screen
Wscript.Echo strDomain & " " & strHOST & " " & strIP
objRecordSet.MoveNext
Loop
Function GetIPFromDNS(sFQDN, strDNS)
Set objWMI=GetObject("WinMgmts://" & strDNS & "\root\microsoftDNS")
Set colIP=objWMI.ExecQuery("Select * from MicrosoftDNS_AType where ownerName='" & sFQDN & "'")
For Each item In colIP
GetIPFromDNS = item.RecordData
Next
End Function
Outfile.Close