- Home
·
- Miscellaneous
·
- ADSI sample showing how to list computers that are connected to a specific domain controller.
ADSI sample showing how to list computers that are connected to a specific domain controller.
ADSI sample showing how to list computers that are connected to a specific domain controller.
Rate ADSI sample showing how to list computers that are connected to a specific domain controller.
(2(2 Vote))
' This script lists computers that are connected to a specific domain controller
' Goto http://www.activxperts.com/activmonitor and click on ADSI Samples
' for more samples
Sub ListConnectedComputers( strDomain )
Dim objPDC
Set objPDC = getobject("WinNT://" & strDomain )
objPDC.filter = Array("Computer")
For Each objComputer In objPDC
WScript.Echo "Name: " & objComputer.Name
Next
End Sub
' Main
Dim strDomain
Do
strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""
ListConnectedComputers( strDomain )
WScript.Echo( vbCrlf & "For more samples, goto http://www.activxperts.com/activmonitor and click" )
WScript.Echo( "on ADSI samples" )
ADSI sample showing how to list computers that are connected to a specific domain controller. Comments
No comments yet — be the first to post one!
Post a Comment