2

I am a junior system IT administrator. We have Windows server 2008 R2 standard and 150 computers with Windows 7 professional (32 bit). We have installed an Active Directory domain on the server and we want to join all 150 computers to the Active Directory domain.

We want just 1 computer to have to 2 users.

How do we do this?

Right now, we do:

  1. Start
  2. "Administrative Tools"
  3. "Active Directory Users and Computers"
  4. domain name
  5. "Computers"
  6. "New"
  7. then click "Computer"
  8. In this dialog we have to type the name of the computer we want to add.

And what I need to have: a list of the all computers (150) and their names.

I am looking for a way to join 150 computers to the Domain in automatic way because I don't want to logon on every PC and join them manually.

3

You'd use netdom. Assuming you don't want to give yourself carpal tunnel... and the most boring day ever.

If you had a text file with all the computer names in it, (one per line) you could whip up a batch script like the below to do it all at once.

FOR /f %%i in (C:\mylistofcomputers.txt) DO (netdom join /d:mydomain.tld /OU:OU=whateverOUtheygoin,DC=mydomain,dC=tld)

Obviously, run your batch script from an elevated command line, as a domain admin. That should give you the general idea and give you enough to make one for your environment.

  • do i need to pre-create computer in DC ... ??? or i can simply add the computer by log in to it. it will create the computer account ... ??? – tony123 Feb 24 '15 at 12:09
  • The netdom join command creates the computer account. Follow the link to the Microsoft documentation on the use of netdom. – HopelessN00b Feb 24 '15 at 12:12
  • 1
    @HopelessN00b how should be handled the client part? netdom have to be run from the client to join the domain; running it on the server creates the machine account only. also the domain admin has no power on the unjoined machines to remotely run commands. – Paolo Feb 24 '15 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.