Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Cant get my script to pull the correct info from AD!!!

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,39283
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Cant get my script to pull the correct info from AD!!!
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Cant get my script to pull the correct info from AD!!! - 10/30/2006 8:03:52 AM   
  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
 
 
Post #: 1
 
 RE: Cant get my script to pull the correct info from AD!!! - 10/31/2006 12:02:15 PM   
  ianober

 

Posts: 2
Score: 0
Joined: 10/30/2006
Status: offline
No one has a suggestion at all?

(in reply to ianober)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Cant get my script to pull the correct info from AD!!! Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts