| |
ianober
Posts: 2
Score: 0
Joined: 10/30/2006
Status: offline
|
I have a script that I am running in AD to pull all active "ENABLED" accounts and specific fields from the user accounts and put them into a HTML phone list, however, it is not excluding all the "DISABLED" accounts as it should. Could any VB guru please confirm that my script is appropriate? This is the main body of the AD connection: Set objDomain = GetObject ("GC://RootDSE") objADsPath = objDomain.Get("defaultNamingContext") Set objDomain = Nothing Set con = Server.CreateObject("ADODB.Connection") con.provider ="ADsDSOObject" con.open "Active Directory Provider" Set Com = CreateObject("ADODB.Command") Set Com.ActiveConnection = con COM.CommandText = "<GC://"+objADsPath+">;(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2));description,sn,title,givenname,physicalDeliveryOfficeName,cn,telephoneNumber,mobile,ipPhone,mail;subtree" Com.Properties("Sort on") = "givenname" Set rs = Com.Execute
|
|