(imported topic written by SystemAdmin)
I have a script that will change the name of a computer in a domain and I would like to make it a fixlet. How do I do so?
The cmd file is
@echo off
cls
color 70
Echo "|---------------------------------------------------|
echo " This Computer is “%computername%”
echo "|---------------------------------------------------|
echo "| |
echo "|This Utility will Rename a computer on the Domain |
echo "| it must be powered on and connected |
echo "| to the network at the time |
echo "| SYSTEM ADMIN |
echo "|---------------------------------------------------|
REM cd /d …
:redo
rem ********************the following will ask for the compuer name **************************
echo “*** TO QUIT TYPE Q”
echo “oldcomputer %oldcomputer%”
SET /P oldcomputer=Please enter the Current Computer Name :
Rem *****************************************************************
if exist “\%oldcomputer%\c$” goto goodname
echo " %oldcomputer% "
pause
:NotFound
color c0
echo " you typed %oldcomputer%"
echo "
echo "
echo "THE COMPUTER WAS NOT FOUND!!! Make Sure it is powered on "
echo “and on the network at this time”
pause
goto redo
:goodname
color 70
echo "
echo "
echo " The computer %oldcomputer% was found
Echo "
echo " Now we need the new computer name
Echo "
SET /P newcomputer=What is the new name of the new computer :
echo "
echo " Your Username : %username%"
echo " The Current Computername: %oldcomputer%
echo " The New Computer Name: %newcomputer%
echo "
echo " You will now be prompted to enter your PASSWORD Twice:
echo "
echo "
netdom renamecomputer %oldcomputer% /newname:%newcomputer% /userD:NV%username% /passwordd:* /usero:NV%username% /passwordo:* /reboot:600
rem netdom renamecomputer %oldcomputer% /newname:%newcomputer% /userD:nv* /passwordd:* /usero:nv* /passwordo:* /reboot:600 /securepasswordprompt
:stopp
goto redo
SET /P anotherrun=Would you like to rename another?(Y/N) :
PAUSE
end
Thank you in advance for the help.