Share via


Windows 2012 Core Survival Guide – Computer Name Setting

Learn about my 2012 Core Survival Guide here.

Computer Name Setting

This blog is going to cover the basic of viewing and changing your computer name.  Setting the computer name is an option when you are installing the OS, or you can let the installer auto name your server.  If for some reason you need to rename your computer it can be done using PowerShell.

How to view computer name

I view the computer name by looking at the environment variable "ComputerName".

PowerShell Command:

Get-Content ENV:Computername

In the sample output below I see that this computer name is "CORETEST1"

How to change computer name

I change the computer name by using the Rename-Computer cmdlet.  

PowerShell Command:

Rename-Computer -NewName MyCoreBox -restart

In the output below we see that this computer is rename from "CORETEST1" to MyCoreBox.  Since the box reboots with this command I have to capture a second screen shot after the reboot to confirm the setting.

 

Screen shot after reboot

 

I hope you found this useful. Please leave me a comment. Let me know if there are any core tasks you would like me to cover.

Bruce

Comments