Bef
2009-07-06 06:29:00 UTC
Hello
I need to join a computer into a specific OU of a domain. It must work when
the computer isn't in the domain and also when the computer-object is already
in the same or a different OU.
This function is documented here:
http://msdn.microsoft.com/en-us/library/aa392154(VS.85).aspx
Unfortunately it doesn't cover its behaviour well enough and I hope someone
here might know some more details. :)
At the moment I'm passing the destination OU and the following flags:
JOIN_DOMAIN = 1, ACCT_CREATE = 2, ACCT_DELETE = 4 and DOMAIN_JOIN_IF_JOINED =
32. I expect it to first delete de computer object from wherever it is and
then create it in the defined OU and join the domain. It doesn't work.
Do I have to call the function twice? First with the ACCT_DELETE flag and
then with the flags JOIN_DOMAIN, ACCT_CREATE and DOMAIN_JOIN_IF_JOINED?
Do I have to specify the account OU when I'm trying to delete the account or
only when I'm trying to create it?
Thank you for sharing your experience! ;)
I need to join a computer into a specific OU of a domain. It must work when
the computer isn't in the domain and also when the computer-object is already
in the same or a different OU.
This function is documented here:
http://msdn.microsoft.com/en-us/library/aa392154(VS.85).aspx
Unfortunately it doesn't cover its behaviour well enough and I hope someone
here might know some more details. :)
At the moment I'm passing the destination OU and the following flags:
JOIN_DOMAIN = 1, ACCT_CREATE = 2, ACCT_DELETE = 4 and DOMAIN_JOIN_IF_JOINED =
32. I expect it to first delete de computer object from wherever it is and
then create it in the defined OU and join the domain. It doesn't work.
Do I have to call the function twice? First with the ACCT_DELETE flag and
then with the flags JOIN_DOMAIN, ACCT_CREATE and DOMAIN_JOIN_IF_JOINED?
Do I have to specify the account OU when I'm trying to delete the account or
only when I'm trying to create it?
Thank you for sharing your experience! ;)