Const ADS_SCOPE_SUBTREE = 2
Ustalony objConnection = CreateObject ("ADODB.Connection")
Ustalony objCommand = CreateObject ("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Aktywny Adresowy Dostawca"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "WYBIÓRKA poczta, sAMAccountName, displayName, showInAddressBook, ADsPath OD "LDAP: //ou=Organisations, dc=HQ, dc=intra" DOKĄD objectCategory='user'"
objCommand.Properties ("Strona Rozmiar") = 2000
objCommand.Properties ("Rodzaj Na") = "displayName"
Ustalony objRecordSet = objCommand.Execute
|