Click here to Skip to main content
15,891,684 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using system.directoryservices.accountmanagement in C# to update fields in active directory and what I need to do within this namespace is to move a user from one Organizational Unit to another. I know how to add and remove a user from a group, but I haven't been able to find how to move between OUs

Any insight would be helpful.

Thanks
Posted
Updated 25-May-11 5:32am
v2

1 solution

Does this[^] article help? There's a bit in there about moving an object from one location to another that might be of interest.
 
Share this answer
 
Comments
swbo102 25-May-11 11:56am    
I've seen that article before. I think their solution was to rename the OU if I remember correctly. I'm hoping that there is a solution using system.directoryservices.accountmanagement instead of using directory entry.

Thanks
Marc A. Brown 25-May-11 11:58am    
It uses DirectoryEntry.MoveTo.
swbo102 25-May-11 14:29pm    
Yep..It appears that you can't do this with the accountmanagement namespace. Only with the older directoryservices. I love it when MS do this, they always stop 90% of the way.

Thanks
Marc A. Brown 25-May-11 14:30pm    
You're welcome. Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900