list of machines from a domain 
Author Message
 list of machines from a domain

I would like to be able to get a list of all machines in an NT domain
written to a file:
machine1
machine2
machine3

Could this be done with WSH? And does anyone have examples

Thanks,
Andy



Sat, 07 Apr 2001 03:00:00 GMT  
 list of machines from a domain

Try this (create c:\computers.txt first)

Dim adsNS, adsComputer
Set FSO = CreateObject("Scripting.FileSystemObject")
Set AFileStream = FSO.OpenTextFile("c:\computers.txt",2)
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set adsNS = GetObject("WinNT://Disneylan")
adsNS.Filter = Array("computer")
For Each adsComputer In adsNS
    AFileStream.WriteLine adsComputer.ADsPath
Next 'adsDomain
AFileStream.close

Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz

    I would like to be able to get a list of all machines in an NT domain
    written to a file:
    machine1
    machine2
    machine3

    Could this be done with WSH? And does anyone have examples

    Thanks,
    Andy



Sun, 08 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Listing the hot fix level of a machine in a nt4 domain

2. How to List Domain Controllers in domain

3. Accessing registry from another machine on domain ?

4. Adding Machine to Domain

5. Windows NT Machine, join Domain through VBS

6. Add a domain group to local machine

7. Adding a Domain Global group to a machine local group in Windows 2000

8. Adding Machine to Domain

9. Adding machine names to domain -

10. Get Machine Name, IP, and MAC from DOMAIN

11. Get Machine Name, IP, and MAC from DOMAIN

12. Add NT machine to domain

 

 
Powered by phpBB® Forum Software