bsharath
asked on
Rename a machine remotely
Hi,
I have this script.Which can rename a machine name in the computers.txt file to the name given in the script (Dev-chen-pc5000)
C:\>for /f "tokens=1,2" %x in (C:\computers.txt) do netdom renamecomputer %x /n
ewname:dev-chen-pc5000 /userD:development\adminis trator /passwordd:password /reboot:10 /force
this is working perfectly for me.
What i want now is to do this for many systems at once.
Can i have a script to rename all the machines in the computers.txt
I have the content as
Oldname : Newname (Inthe txt file)
Can a script rename all the machines at once.
Regards
Sharath
I have this script.Which can rename a machine name in the computers.txt file to the name given in the script (Dev-chen-pc5000)
C:\>for /f "tokens=1,2" %x in (C:\computers.txt) do netdom renamecomputer %x /n
ewname:dev-chen-pc5000 /userD:development\adminis
this is working perfectly for me.
What i want now is to do this for many systems at once.
Can i have a script to rename all the machines in the computers.txt
I have the content as
Oldname : Newname (Inthe txt file)
Can a script rename all the machines at once.
Regards
Sharath
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OldName:NewName
OldName1:NewName1
OldName2:NewName2
OldName3:NewName3
^------------------- Colon separated
OldName1:NewName1
OldName2:NewName2
OldName3:NewName3
^------------------- Colon separated
ASKER
I get this.
C:\>NetDom RenameComputer dev-chen-nas100 /newname:dev-chen-nas1000 /userD:devel
opment\administrator /passwordd:password /reboot:10 /force
The NetBIOS name of the computer is limited to 15 bytes. The NetBIOS name
will be shortened to "DEV-CHEN-NAS100".
The command completed successfully.
Will this have any problems
C:\>NetDom RenameComputer dev-chen-nas100 /newname:dev-chen-nas1000 /userD:devel
opment\administrator /passwordd:password /reboot:10 /force
The NetBIOS name of the computer is limited to 15 bytes. The NetBIOS name
will be shortened to "DEV-CHEN-NAS100".
The command completed successfully.
Will this have any problems
All NetBIOS names are 16 characters in length. However Microsoft limits a NetBIOS name to be 15 characters in lenght and uses the 16th character as the NetBIOS suffix.
So 'dev-chen-nas1000' is an invalid name because it has 16 characters (it should have maximum 15 characters)
So 'dev-chen-nas1000' is an invalid name because it has 16 characters (it should have maximum 15 characters)
Have a look at following:
http://support.microsoft.com/kb/909264
http://support.microsoft.com/kb/909264
ASKER
ASKER