netdom join

  • Thread starter Thread starter LWG
  • Start date Start date
L

LWG

i want to use netdom.exe to create ou entries for workstations. i have a
list of machine names formatted as follows:

machine1
machine2
machine3...

how can i feed this into a batch to quickly add the machine names. The
netdom.exe syntax would be:


netdom add machine0 /d:home /ou:ou=computers,ou=home,dc=home,dc=com

thx all...
 
machine1
machine2
machine3...

how can i feed this into a batch to quickly add the machine names. The
netdom.exe syntax would be:
netdom add machine0 /d:home /ou:ou=computers,ou=home,dc=home,dc=com

for /f %a in (computername.txt) do netdom add %a /d:home
/ou:ou=computers,ou=home,dc=home,dc=com

If used inside a CMD write %%a instead of %a.

Ciao, Walter
 
I added the % for cmd and it worked great. I would like to ask another
question. Can I use 'for' to update a file for example:

i have a list of numbers:
1234
1235
1236
1237...

i want to put a name in front of this:

compa1234
compa1235
compa1236
compa1237...

thx again...
 
Back
Top