by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
ADSI sample - retrieves computers that are connected to a specific domain controller. Written in VBScript, using ADSI.
' This script lists computers that are connected to a specific domain controller
' Goto http://www.activexperts.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.activexperts.com/activmonitor and click" )
WScript.Echo( "on ADSI samples" )
No comments have been posted about ADSI sample - retrieves computers that are connected to a specific domain controller. Written in VB. Why not be the first to post a comment about ADSI sample - retrieves computers that are connected to a specific domain controller. Written in VB.