Listing Configurations of All Computers

You may need to use an On Error Goto statement to handle runtime errors. These may happen if a computer is off or if you do not have access rights over that computer.

Dim NameSpace   As IADsContainer
Dim Computer    As IADsComputer
Dim DomainContainer  As IADsContainer
Dim Domain    As IADsDomain

'Bind to the known NameSpace.
Set NameSpace = GetObject("NTDS://")

'Enumerate the all domains first
For Each Domain In NameSpace
Set DomainContainer = Domain
DomainContainer.Filter = "Computer"

'Enumerate the all Computers in the Domain
For Each Computer In DomainContainer
  Debug.Print Computer.Name
 Debug.Print Computer.Description
  Debug.Print Computer.Processor
 Debug.Print Computer.ProcessorCount
  Debug.Print Computer.Owner
 Debug.Print Computer.OperatingSystem
 Debug.Print Computer.OperatingSystemVersion
 Debug.Print Computer.Model
 Debug.Print Computer.Site

 'Getting Addresses can take a long time!
 Debug.Print Computer.Addresses
 Next Computer
Next Domain