PowerTip: Rename a Computer with PowerShell

Doctor Scripto

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

0 comments

Discussion is closed.

Feedback usabilla icon