The easiest way, specially when you have a number to add, is to use NETDOM.
NOTE: You can not use earlier versions of NETDOM.
The syntax of the command you would use is:
NETDOM /Domain:<YourDomain> /user:<Domain Admin UserName> /password:<Domain Admin password> MEMBER <Member ComputerName> /ADD
As the only thing that changes is the <Member ComputerName>, you can create a simple called batch:
call addmbr <Member ComputerName> \[<Member ComputerName1>\] \[<Member ComputerName2>\] \[<Member ComputerNamen>\]
where addmbr.bat contains:
@echo off
if not "%1"
"" goto loop
@echo At least one Computer Name is required.
goto end
:loop
if "%1"
"" goto end
NETDOM /Domain:<YourDomain> /user:<Domain Admin UserName> /password:<Domain Admin password> MEMBER %1 /ADD
shift
goto loop
:end
0 comments
Hide comments