agarabaghi Posted June 8, 2012 Posted June 8, 2012 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?
tomgrindle Posted June 8, 2012 Posted June 8, 2012 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.
agarabaghi Posted June 8, 2012 Author Posted June 8, 2012 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.
FN-GM Posted June 9, 2012 Posted June 9, 2012 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! netdom renamecomputer [i]oldname[/i] /newname:[i]newcomputername[/i] /userd:DOMAIN\USER /passwordd:PASSWORD /usero:DOMAIN\USER /passwordo:PASSWORD /force /reboot:5 You could also steal code from this: http://www.edugeek.net/blogs/fn-gm/1143-rename-computer-remotely.html
Arthur Posted June 9, 2012 Posted June 9, 2012 Use netdom it's built into Windows Netdom isn't included with Windows 7. http://i.imgur.com/Ys0Qc.png
FN-GM Posted June 9, 2012 Posted June 9, 2012 (edited) Netdom isn't included with Windows 7. http://i.imgur.com/Ys0Qc.png @Arthur It is on mine..... - see the attached. EDIT: i didnt notice you have made a link. It comes with RSAT. Edited June 9, 2012 by FN-GM
Arthur Posted June 9, 2012 Posted June 9, 2012 It is on mine..... Must be because you have RSAT installed.
6288 Posted June 12, 2012 Posted June 12, 2012 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now