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
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.