| |
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
|
|