|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Help: Network computer name change and join domain
Hi,
I am looking for help on creating a script that will change all the computer names in our Active Directory Domain and then rejoin the domain (Active Directory Domain). All the PCs are Windows 2000 and Windows XP pro Please email me at huym01@hotmail.com Thanks. |
|
#2
|
||||
|
||||
|
I found this code which may allow you to change the computer name:
Code:
sNewName = "put new name here"
Set oShell = CreateObject ("WSCript.shell")
sCCS = "HKLM\SYSTEM\CurrentControlSet\" sTcpipParamsRegPath = sCCS &
"Services\Tcpip\Parameters\" sCompNameRegPath = sCCS & "Control\ComputerName\"
With oShell .RegDelete sTcpipParamsRegPath & "Hostname" .RegDelete
sTcpipParamsRegPath & "NV Hostname"
.RegWrite sCompNameRegPath & "ComputerName\ComputerName", sNewName .RegWrite
sCompNameRegPath & "ActiveComputerName\ComputerName", sNewName .RegWrite
sTcpipParamsRegPath & "Hostname", sNewName .RegWrite sTcpipParamsRegPath & "NV
Hostname", sNewName End With ' oShell
MsgBox "Computer name changed, please reboot your computer"
This may not work in a domain environment though. But this script should allow you to rename the computer and rename the corresponding computer account in the Active Directory: http://www.microsoft.com/technet/co...mt/scrcm36.mspx To join a computer to a domain, this link my be of use: http://www.microsoft.com/technet/co...mt/scrcm31.mspx HTH, Edwin |
![]() |
| Viewing: Dev Shed Forums > System Administration > Networking Help > Help: Network computer name change and join domain |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|