Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Active Directory Queries(Solved)

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Active Directory Queries(Solved)
  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 >>
 Active Directory Queries(Solved) - 6/14/2007 1:34:59 AM   
  DiGiTAL.SkReAM


Posts: 1194
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
I am trying to query various fields from a subnet object in AD.
The distinguishedName for the object is "CN=10.1.84.0/24,CN=Subnets,CN=Sites,CN=Configuration,DC=Company,DC=com" however, when I try to attach to it via a LDAP or ADO query, i get "Active Directory: An invalid directory pathname was passed"

Anyone have any idea as to how to query the various fields of this object directly?  I *can* search for all objects in that container that have "10.1.84*" in their name field,( WHERE name='10.1.84*') but for speed purposes, I would prefer to attach directly to the proper object.

EDIT:

I solved this one on my own.  The solution is to put a \ character in front of the /24.  IE:
Instead of binding to the object like this:
GetObject("LDAP://CN=10.1.84.0/24,CN=Subnets,CN=Sites,CN=Configuration,DC=Company,DC=com")
You have to do it like this:
GetObject(LDAP://CN=10.1.84.0\/24,CN=Subnets,CN=Sites,CN=Configuration,DC=Company,DC=com)



< Message edited by DiGiTAL.SkReAM -- 6/14/2007 2:25:44 AM >


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Active Directory Queries(Solved) 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