Lists servers in a specified Active Directory site.
strSiteRDN = "cn=Ga-Atl-Sales"Set objRootDSE = GetObject("LDAP://RootDSE")strConfigurationNC = objRootDSE.Get("configurationNamingContext")strServersPath = "LDAP://cn=Servers," & strSiteRDN & ",cn=Sites," & _strConfigurationNCSet objServersContainer = GetObject(strServersPath)For Each objServer In objServersContainerWScript.Echo objServer.NameNext
This is a VB Script, this can be used by saving the file in .vbs file