VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ADSI sample showing how to list all domains in the namespace.

by Bart Jonkman (20 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ADSI sample showing how to list all domains in the namespace.

Rate ADSI sample showing how to list all domains in the namespace.



' This script lists all domains in the namespace

' Goto http://www.activxperts.com/activmonitor and click on ADSI Samples
' for more samples


Sub ListDomains()
Dim objNameSpace
Dim Domain

Set objNameSpace = GetObject("WinNT:")
For Each objDomain In objNameSpace
WScript.Echo "Name: " &  objDomain.Name
Next
End Sub



' Main

ListDomains()

WScript.Echo( vbCrlf & "For more samples, goto http://www.activxperts.com/activmonitor and click" )
WScript.Echo( "on ADSI samples" )

Download this snippet    Add to My Saved Code

ADSI sample showing how to list all domains in the namespace. Comments

No comments have been posted about ADSI sample showing how to list all domains in the namespace.. Why not be the first to post a comment about ADSI sample showing how to list all domains in the namespace..

Post your comment

Subject:
Message:
0/1000 characters