Renaming a Workstation with netDom.exe
Simple script to rename a workstations with out going through the hassle of first removing it from the domain, renaming it, and then adding it back to the domain.
@echo off
echo.
echo ———————————-
echo * Rename System Script *
echo ———————————-
echo.
if “%1″==”/?” goto Help
if “%1″==”" goto Help:Main
IF NOT EXIST %windir%\netdom.exe copy C:\Shared Library\Automation\Rename Workstation\netdom.exe %windir%
netdom renamecomputer %computername% /newname:%1 /userd:domain\Username /passwordd:%2 /usero:domain\Username /passwordo:%2 /reboot:20
goto End:Help
Echo .
echo CompName.cmd : Renames current computer locally and in the domain.
Echo .
echo CompName [NEWNAME] [DOMAINPASSWORD]
echo “/?” Displays command help.
Echo .:End
Echo .
Echo Command complete
Echo .






