
|
email this FAQ to a colleague
Q:
How do I view all the domains that are available using ADSI?
A:
Here is some code that uses ADSI to display all the domains available:
Dim adsNS As IADsContainer
Dim adsDomain As IADsDomain
Set adsNS = GetObject("WinNT:")
adsNS.Filter = Array("domain")
For Each adsDomain In adsNS
Response.Write(adsDomain.ADsPath & " ")
Next adsDomain
Here is some code that uses ADSI to display all the domains available:
Dim adsNS As IADsContainer
Dim adsDomain As IADsDomain
Set adsNS = GetObject("WinNT:")
adsNS.Filter = Array("domain")
For Each adsDomain In adsNS
Response.Write(adsDomain.ADsPath & "<BR>")
Next adsDomain
- Wayne Berry
|