October 28th, 2013

PowerTip: Rename a Computer with PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to rename a newly created computer.

Hey, Scripting Guy! Question How can I use Windows PowerShell to rename a computer if I don’t know the machine name?

Hey, Scripting Guy! Answer Use the Rename-Computer cmdlet and the built in HOSTNAME command, then reboot the computer. 
          For example, to rename a computer to called MININT-123 to CONTOSO-FS:

RENAME-COMPUTER –computername MININT-123 –newname CONTOSO-FS

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.