ADSI move user help

ADSI move user help

Post by doug p » Wed, 02 Jul 2003 02:44:12



I get the following error when I run the below code:

"(5, 1) (null): There is no such object on the server."

I have ruled out permissions and incorrect AD paths ... any ideas?

- doug

--------------------------------
Dim objOU

Set objOU = Getobject("LDAP://ou=Sales,dc=company,dc=com")

objOU.MoveHere _
"LDAP://cn=USMILLERD,ou=HR,dc=company,dc=com", vbNullstring

Set objOU = Nothing

 
 
 

ADSI move user help

Post by Richard Mueller [MVP » Wed, 02 Jul 2003 03:29:23



> I get the following error when I run the below code:

> "(5, 1) (null): There is no such object on the server."

> I have ruled out permissions and incorrect AD paths ... any ideas?

> - doug

> --------------------------------
> Dim objOU

> Set objOU = Getobject("LDAP://ou=Sales,dc=company,dc=com")

> objOU.MoveHere _
> "LDAP://cn=USMILLERD,ou=HR,dc=company,dc=com", vbNullstring

> Set objOU = Nothing

Hi,

The code looks fine. It's not supposed to matter, but does it help if you
replace vbNullString with "cn=USMILLERD"?

--
Richard
Microsoft MVP Scripting and ADSI
http://www.rlmueller.net
--

 
 
 

ADSI move user help

Post by Marc Scheuner [MVP ADSI » Wed, 02 Jul 2003 14:39:51


Quote:>I get the following error when I run the below code:
>"(5, 1) (null): There is no such object on the server."

>I have ruled out permissions and incorrect AD paths ... any ideas?
>--------------------------------
>Dim objOU

>Set objOU = Getobject("LDAP://ou=Sales,dc=company,dc=com")

>objOU.MoveHere _
>"LDAP://cn=USMILLERD,ou=HR,dc=company,dc=com", vbNullstring

>Set objOU = Nothing

The only thing I see is that you use server-less binding - we did run
into some troubles with that at times, when dealing with multiple DC's
in a domain.

Could you try to use your server in your LDAP string??

objOU.MoveHere _
"LDAP://MyServer/cn=USMILLERD,ou=HR,dc=company,dc=com", vbNullstring

or alternatively:
"LDAP://MyServer.company.com/cn=USMILLERD,ou=HR,dc=company,dc=com",
vbNullstring

Does any of that make a difference?

Marc

================================================================
Marc Scheuner                        May The Source Be With You!
Bern, Switzerland                         m.scheuner(at)inova.ch

 
 
 

1. adsi move user

I am trying to move a user account from one OU to another using VB script.
I have some documentation on how to do it, but I can't get it to work.  Does
anyone have any real code examples on doing this.  Any help appreciated.

Also, what is the difference in binding using LDAP:// as opposed to
WinNT://?

Thanks,

Brent Grooms

2. Has slip been ported to Sun i386?

3. Help: Moving "Users Shared Folders" to other Partition

4. Newbie's question about single step (platform: TI 6201)

5. Help: Need ADSI C++ code to get the user objectSid attribute

6. Lefty

7. Help: Retrieve org. unit or Company from user using ADSI

8. Battery Powered Modems

9. ADSI User update page - Help needed

10. Help for retrieving user info with ADSI and VB

11. Script that remotely moves local users from Administrators to Power Users group

12. User ADSI to create user on remote NT server

13. Problem with ADSI with LDAP server Through ASP...HELP HELP !!!