r/ScriptSwap • u/phletch • Dec 25 '12
[Request] Change Domain-joined Windows PC name using batch
Does anyone know if I can rename Windows PCs using batch in a domain environment? I am successful in writing to the registry values below, but the changes are not reflected in AD or DNS (windows server 2003), but echoing %computername% on the machine looks correct. Can still log in to domain after making these changes. The answer may be to do this manually, but I'm looking to do this to over 150 machines... really hoping for some automation.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\ComputerName\ComputerName] /v "ComputerName"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters] /v "NV Hostname"
View all comments
Show parent comment
1
u/bustedtacostand Jan 04 '13
Thats great ! Glad I could help. :D