Config Server Firewall

How to Find Hostname in Windows 10/11

In the following tutorial, you will learn how to find the Hostname in Windows 10 using the System Information utility, Command Prompt, and PowerShell.

I will also demonstrate how to change the Hostname using the Rename-Computer PowerShell command.

The built-in System Information tool displays basic system details, including Windows version, Processor type, Installed Physical Memory, and Hostname.

On your Windows computer, click the Start button, type msinfo32, and then press Enter to open the System Information utility.

Next to System Name, you will find the Hostname, as shown in the following screenshot.

System Information tool displays Hostname

The Hostname Command

At a command prompt, type hostname and press Enter to find the Hostname of the local computer.

hostname
The Hostname Command

Alternatively, you can also use the ipconfig /all command to find the hostname. The hostname is found under the Windows IP Configuration section.

how to find hostname in windows 10

On a PowerShell prompt, you can use the Get-ComputerInfo command to find the computer name:

Get-ComputerInfo -Property CsName
PowerShell command to find hostname in Windows

Changing the Hostname

To change the hostname, use the Rename-Computer PowerShell command.

Example

The following command changes the hostname of the local computer to MyPC.

Rename-Computer -NewName MyPC -Restart

The command will change the hostname and will restart your computer immediately. If you don't want to restart your computer, don't use the -Restart parameter (the name will not change until you restart Windows).

Rename-Computer -NewName MyPC
Opening an Administrator Command Prompt on Windows