Afficher un message
Vieux 25/09/2007, 19h22   #2
meek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Amateur Scripter Question

Thanks Rich. You are absolutely correct. I had the order wrong. However,
after changing the order, I get an error stating the item doesn't exist. Let
me take another look to see if I goofed something up. Thanks for the
immediate response.

One more thing, once I get this script working, how to I apply it to all
users in the OU? Would I just use the %username% in the place of the
username and home directory folder name?
--
Change your thoughts and you change your world.


"Richard Mueller [MVP]" wrote:

> meek wrote:
>
> >I can't get my script to work on objects nestled in 2 OU levels deep. They
> > only work in the 1st OU level. For example: OU=United States, OU=New
> > York.
> > If the object is in the New York OU, it doesn't work. If I move it up to
> > the
> > United States OU it works. Is there something extra you need to do to
> > touch
> > objects nestled 2 OU's deep?

>
> If the components of the AdsPath are comma delimited as in your example,
> your ADSI binding string is in Little-Endian form. This is the default (I
> have never seen anyone use the alternative Big-Endian form). The components
> are listed in order from the lowest level to the highest. The last
> components in the AdsPath are the domain. The first component is the
> relative distinguished name of the specific object you are referencing.
>
> In your example, "ou=United States" resides in "ou=New York", which doesn't
> seem likely. I assume the components are listed in the wrong order. To bind
> to the user "cn=Jim Smith" in "ou=United States", which is in the root of
> the domain "MyDomain.com", you would use:
>
> Set objUser1 = GetObject("LDAP://cn=Jim Smith,ou=United
> States,dc=MyDomain,dc=com")
>
> If "ou=New York" is in "ou=United States" ("ou=New York" is a child of the
> parent "ou=United States"), you would bind to the user "cn=Mary Johnson" in
> "ou=New York with:
>
> Set objUser2 = GetObject("LDAP://cn=Mary Johnson,ou=New York,ou=United
> States,dc=MyDomain,dc=com")
>
> Does this ?
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
>

  Réponse avec citation
 
Page generated in 0,05657 seconds with 9 queries