Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List the Subnets in an Active Directory SiteContent of List the Subnets in an Active Directory Site.vbsMD5 Hash: 4D25E7CA8C0439175D0CEFC9F6DC582B |
||
' Description: Lists subnets in a specified Active Directory site.
strSiteRDN = "cn=Ga-Atl-Sales" Set objRootDSE = GetObject("LDAP://RootDSE") strConfigurationNC = objRootDSE.Get("configurationNamingContext") strSitePath = "LDAP://" & strSiteRDN & ",cn=Sites," & strConfigurationNC Set objSite = GetObject(strSitePath) objSite.GetInfoEx Array("siteObjectBL"), 0 arrSiteObjectBL = objSite.GetEx("siteObjectBL") WScript.Echo strSiteRDN & " Subnets" & vbCrLf & _ String(Len(strSiteRDN) + 8, "-") For Each strSiteObjectBL In arrSiteObjectBL WScript.Echo Split(Split(strSiteObjectBL, ",")(0), "=")(1) Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |