Adding a Domain to a Workstation
Keywords: Adding a Domain to a Workstation
Question:
I am using netdom now, but if the join fails, winbatch doesn't catch it. Is there an extender that will allow scripted additions to a domain?Answer:
There are 2 separate steps involved in adding a workstation to a domain.Both of these tasks can be performed with the NT extender. You will need to use wntUserAddDat()/wntUserAdd() to create the machine account. You will need to use wntLsaPolSet() to make the workstation think that is now part of the domain. Then you reboot and if both steps were completed properly the workstation will come back up as a member of the domain and will allow you to logon locally using a domain account.
- Add the machine account to the domain.
- Change the local workstation's primary domain setting from a WG value to a domain name.
If you use the search feature on the webboard you will be able to find a recent threaded discussion about taking a domain member workstation and taking it out of the domain and placing it into a work group. You want to do the exact opposite, and it would be helpful for you to read that thread because it discusses in greater detail what's involved in each of the 2 steps mentioned above.
Article ID: W15190