JSI Tip 2255. How do I create Windows 2000 computer accounts?

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

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish