I looking for a way to take 28 computers that are on the domain, and rename them and re join them to the domain.
The reason is they have moved from 1 lab to another, and they should go from CSSLAB## to TEACHINGLAB##
any idea?
I looking for a way to take 28 computers that are on the domain, and rename them and re join them to the domain.
The reason is they have moved from 1 lab to another, and they should go from CSSLAB## to TEACHINGLAB##
any idea?
I usually just log onto them as a domain admin ... Right click on My Computer, go to Properties and change the machine name in there and then reboot. Not sure how this would work though if a the name you want to give it already existed ... As long as its deleted out of AD, DHCP and DNS I presume it should be ok.
I say already ... I mean used to obviously lol.
i really want to push a batch file or vbs through deep freeze on these machines and have it pop up with a windows "please enter computername" and you type in CSSLAB## (#=number 1,2,etc...) and then it joing the Rollins.edu domain.

Use netdom its built into windows. You just run it from one machine. I renamed 100 machines a few weeks ago in about 10 mins. Easy!
You could also steal code from this: http://www.edugeek.net/blogs/fn-gm/1...-remotely.htmlCode:netdom renamecomputer oldname /newname:newcomputername /userd:DOMAIN\USER /passwordd:PASSWORD /usero:DOMAIN\USER /passwordo:PASSWORD /force /reboot:5

Netdom isn't included with Windows 7.
![]()

@Arthur It is on mine..... - see the attached.
EDIT: i didnt notice you have made a link. It comes with RSAT.
Last edited by FN-GM; 9th June 2012 at 03:16 PM.

Not sure if this will work 100% but its always worth a try. Let me know if this works??
@echo off
echo ****THIS WILL REJOIN YOUR PC TO DOMAIN*****
echo
echo If you do not get a PING response this will NOT work!
pause
set /p Comp=What is the Computer name?:
ping %comp%
:Respond
set /p yn=Did you get a response [Y/N]?:
if /I "%yn%"=="n" (GOTO Ping)
if /I "%yn%"=="y" (GOTO Leave) else (GOTO Respond)
:Leave
set /p User=What is your username?:
echo Leaving the domain...
netdom.exe remove %comp% /domain:******* /userd:*****\%user% /passwordd:*
:Leave2
set /p yn=Did the above command process succesfully [Y/N]?:
if /I "%yn%"=="n" (GOTO Lazy)
if /I "%yn%"=="y" (GOTO Join) else (GOTO Leave2)
:Join
echo Rejoining the domain...
netdom.exe join %comp% /domain:***** /userd:*******\%user% /passwordd:*
:Join2
set /p yn=Did the above command process succesfully [Y/N]?:
if /I "%yn%"=="n" (GOTO Lazy)
if /I "%yn%"=="y" (GOTO Restart1) else (GOTO Join2)
:Restart1
set /p yn=Do you want to restart [Y/N]?:
if /I "%yn%"=="n" (GOTO END)
if /I "%yn%"=="y" (GOTO Restart) else (Goto Response)
shutdown -m \\%comp% -r -t 0
:END
exit
:Restart
shutdown -m \\%comp% -r -t 0
GOTO END
:Ping
echo Will not work unless you get a response.
pause
GOTO END
:Lazy
echo Enjoy your walk to the machine!!
GOTO END
There are currently 1 users browsing this thread. (0 members and 1 guests)