Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List All ADAM OUsContent of List All ADAM OUs.vbsMD5 Hash: B23963F58206DE88938A6FB5E76D1D55 |
||
' Description: Lists all the OUs in an ADAM domain.
On Error Resume Next Set objDomain = GetObject("LDAP://localhost:389/dc=fabrikam,dc=com") objDomain.Filter = Array("organizationalUnit") For Each objOU in objDomain strNames = strNames & objOU.Name & vbcrlf ShowOUS objOU.AdsPath Next Sub ShowOUs(OUName) Set objNextOU = GetObject(OUname) objNextOU.Filter = Array("organizationalUnit") For Each objSubOU in objNextOU strNames = strNames & " " & objSubOU.Name & vbcrlf ShowOUS objSubOU.AdsPath Next End Sub Wscript.Echo strNames | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |