Script to change Computer Names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a script that can change all the cp names in my domain. I would like
the script to automatically name the computers test1, test2, test3, etc
 
Jason said:
I need a script that can change all the cp names in my domain. I
would like the script to automatically name the computers test1,
test2, test3, etc

Automatically based off what?
Just want to rename them based off a list?

You could use NETDOM and integrate this line into a script.. perhaps with a
loop reading a file of current domain computernames and then looping through
a count and adding to the end of the new name so you get TEST###...

netdom renamecomputer OLDCOMPNAME /newname:NEWCOMPNAME
/userD:DOMAIN\DOMAIN_ADMIN_USERNAME /passwordD:DOMAIN_PASSWORD
/userO:DOMAIN\DOMAIN_ADMIN_USERNAME /passwordO:DOMAIN_PASSWORD /force
/reboot:COUNTDOWNTIMEHERE

All one line above. ALL CAPS represents things you would enter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top