It would be strange to have a mydomain.com...
Bob
![]() | Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years. Thanks, CNET Support |
I am stumped.
I have sample code;
Set objDesktopOu = _
GetObject("LDAP://ou=" _
& "Desktops,dc=MyDomain," _
& "dc=com")
objDesktopOu.MoveHere _
"LDAP://cn=UserOne,ou=corp," _
& "dc=MyDomain,dc=com", _
& "cn=UserOne"
For moving a user from one OU to another via script. It doesn't work though. I keep getting errors that .MoveHere isn't something that can be used here.
I try the dsmove commands from a command prompt, and the move doesn't work that way either. Is my AD Schema not setup correctly, or do these methods not really work?
What am I missing?
Discussion is locked
That link is one of the places I found this code. msdn.microsoft.com has some as well.
None of them work. The MyDomain.Com is just an example. I put in my domain information and it just isn't working. I can scripting anything else I have ever tried with AD accounts, but can't seem to pull this off.
And it seems so simple.
Yes, I don't know how they expected this to work. From everything I see on msdn, you have to declare it as an IADSContainer, and I followed all their rules, and it still doesn't work.
I finally did get the dsmove command to work though.
That will do, I will just call the command from the script and go from there.
Thanks for looking.