Automating Adding Multiple PCs to a Domain


How would i add multiple PCs to a Domain? Lets say 300


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITEnd-user supportCommented:
Note: The /user: and /password: switches pertain to a domain admin

1. Make a computers.txt file containing the computer names. e.g.

Open in new window

2. Make a .bat file to join the computers to domain
for /f %%a in (computers.txt) do (NETDOM /Domain:MYDOMAIN /user:domainadminuser /password:domainadminpassword MEMBER %%a /JOINDOM)

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
YellowbusTeamAuthor Commented:
Would this be run on the DC?
NVITEnd-user supportCommented:
It can be run on a workstation.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

YellowbusTeamAuthor Commented:
I want to be able to sit at 1 PC and run it from there on all of the other PCs if there are 300 hundred PCs it may take a while to run it on each individually?

NVITEnd-user supportCommented:
Assuming each computer can access the domain controller, each call in the .bat file to the NETDOM command should be quick.

Try a test to see if it works.
- Logon the workstation as domain admin.
- Add 1 or 2 computers to computers.txt
- Open a CMD prompt
- Make the .bat file with code I posted.
- Run the .bat file
Suggest you click:

To request your question be moved from "Automotive" topics to the correct / relevant topics designation, that will get further expert input on this.
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
NVITEnd-user supportCommented:
Answers ID: 40812793, ID: 40813167, and ID: 40819599 answers the question.
Mr. WolfeCommunity Support ModeratorCommented:
I've requested that this question be deleted for the following reason:

Author abandoned.  Unverified answers.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.