Returns information found on the General Properties page in Active Directory Users and Computers for an OU named Sales.
On Error Resume NextSet objContainer = GetObject _("LDAP://ou=Sales,dc=NA,dc=fabrikam,dc=com")strStreetAddress = objContainer.Get("street")strLocalityName = objContainer.Get("l")strStreetName = objContainer.Get("st")strPostalCode = objContainer.Get("postalCode")strCountryName = objContainer.Get("c")strDescription = objContainer.GetEx("description")For Each strValue in strDescriptionWScript.echo "description: " & strValueNextWScript.echo "streetAddress: " & strStreetAddressWScript.echo "l: " & strLocalityNameWScript.echo "st: " & strStreetNameWScript.echo "postalCode: " & strPostalCodeWScript.echo "c: " & strCountryName
This is a VB Script, this can be used by saving the file in .vbs file