Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - determine ldap path

Reply
 
Old 09-11-2008   #1 (permalink)
Jeremy Schubert


 
 

determine ldap path

I'm writing a few scripts to modify AD attributes. I alwasy run into errors
with my ldap paths. I type the structure the way I see it in the Active
Directory Users and Computers console. So I'm pretty sure some sort of
typos are responsible for the errors. Is there some utility or script I can
use that will echo back the path to me so I can then copy and paste it into
my script? Something that would return something similar to
("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")?


My System SpecsSystem Spec
Old 09-11-2008   #2 (permalink)
Al Dunbar


 
 

Re: determine ldap path


"Jeremy Schubert" <jscc@xxxxxx> wrote in message
news:84F8960F-52FF-41E6-AAE4-B3720D0A994A@xxxxxx
Quote:

> I'm writing a few scripts to modify AD attributes. I alwasy run into
> errors with my ldap paths. I type the structure the way I see it in the
> Active Directory Users and Computers console. So I'm pretty sure some
> sort of typos are responsible for the errors. Is there some utility or
> script I can use that will echo back the path to me so I can then copy and
> paste it into my script? Something that would return something similar to
> ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")?
A less error-prone approach would be to input the sAMAccountName and use
NAMETRANSLATE to determine the distinguished name:

http://www.rlmueller.net/NameTranslateFAQ.htm

/Al


My System SpecsSystem Spec
Old 09-11-2008   #3 (permalink)
Jeremy Schubert


 
 

Re: determine ldap path

Thanks Al. Thinking it over, I think I should actually be using dsmod
because I want to effect all users in an OU, not just one. And I've found
plenty of samples of that on the web.
"Al Dunbar" <AlanDrub@xxxxxx> wrote in message
news:u4hFLFIFJHA.4064@xxxxxx
Quote:

>
> "Jeremy Schubert" <jscc@xxxxxx> wrote in message
> news:84F8960F-52FF-41E6-AAE4-B3720D0A994A@xxxxxx
Quote:

>> I'm writing a few scripts to modify AD attributes. I alwasy run into
>> errors with my ldap paths. I type the structure the way I see it in the
>> Active Directory Users and Computers console. So I'm pretty sure some
>> sort of typos are responsible for the errors. Is there some utility or
>> script I can use that will echo back the path to me so I can then copy
>> and paste it into my script? Something that would return something
>> similar to ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")?
>
> A less error-prone approach would be to input the sAMAccountName and use
> NAMETRANSLATE to determine the distinguished name:
>
> http://www.rlmueller.net/NameTranslateFAQ.htm
>
> /Al
>
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Get LDAP-"Path" from WinNT object VB Script
LDAP not working Live Mail
BUG? (Test-Path $path -IsValid) and empty $path PowerShell
BUG/ANNOYANCE: PoSH autocompletes the full path rather than a minimal path PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46