Determining or changing the system name for a computer running Windows 8

To determine the system name for a computer running the Microsoft Windows 8 operating system, you can take the following steps:

Graphical User Interface (GUI) method

Right-click on the Windows Start Button at the lower, left-hand corner of the screen. If you don't see it, hit the Esc key and move the mouse pointer to the lower, left-hand corner of the screen where it should appear. You will see the system's name listed in the "Computer name, domain, and workgroup settings" section.

Windows 8 computer name

If you want to give the system a new name, click on Change settings and then click on the Change button.

Command Line Interface (CLI) method

If you want to obtain the information through a command-line interface (CLI) method, instead, you can do so either at a command prompt or PowerShell prompt.

Command Prompt

Click on the Windows Start Button at the lower, left-hand corner of the screen or hit the Windows key then in the "Ask me anything" field type cmd and hit the Enter key to obtain a command prompt. Type hostname and hit Enter.

oreilly.com - Your tech ebook super store
C:\Users\nell>hostname
Enda

C:\Users\nell>

In the example above, the system's name is Enda.

Alternatively, you can obtain the computer's name through the omputername environment variable.

C:\Users\nell>echo %computername%
ENDA

C:\Users\nell>

An another alternative is to use the Windows Management Instrumentation Command-line (WMIC). If you issue the command wmic path win32_computersystem get /format:list, you will get a lot of other information about the system, which will include the system's name. You can restrict the information displayed to just the computer name with the command wmic path win32_computersystem get name.

C:\Users\nell>wmic path win32_computersystem get name
Name
ENDA


C:\Users\nell>

PowerShell

You can also use the hostname command with Windows PowerShell, rather than the command prompt. You can open a PowerShell window by typing powershell in the "Ask me anything" field, rather than cmd, and then hit Enter with "Windows PowerShell" selected.

Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS C:\Users\nell> hostname
Enda
PS C:\Users\nell>