You will see the system name to the right of "PCname".
If you want to give the system a new name, click on the Rename PC button.
cmd
and hit the Enter key to obtain a command prompt.
Type hostname and hit Enter.
C:\Users\nell>hostname LAPTOP-G6CRR45D C:\Users\nell>
In the example above, the system's name is LAPTOP-G6CRR45D
.
Alternatively, you can obtain the computer's name through the omputername environment variable.
C:\Users\nell>echo %computername% LAPTOP-G6CRR45D 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.
C:\Users\nell>wmic path win32_computersystem get /format:list AdminPasswordStatus=3 AutomaticManagedPagefile=TRUE AutomaticResetBootOption=TRUE AutomaticResetCapability=TRUE BootOptionOnLimit= BootOptionOnWatchDog= BootROMSupported=TRUE BootStatus={0,0,0,0,0,0,0,0,0,0} BootupState=Normal boot Caption=LAPTOP-G6CRR45D ChassisBootupState=3 ChassisSKUNumber= CreationClassName=Win32_ComputerSystem CurrentTimeZone=-240 DaylightInEffect=TRUE Description=AT/AT COMPATIBLE DNSHostName=LAPTOP-G6CRR45D Domain=WORKGROUP DomainRole=0 EnableDaylightSavingsTime=TRUE FrontPanelResetStatus=3 HypervisorPresent=FALSE InfraredSupported=FALSE InitialLoadInfo= InstallDate= KeyboardPasswordStatus=3 LastLoadInfo= Manufacturer=HP Model=HP Notebook Name=LAPTOP-G6CRR45D NameFormat= NetworkServerModeEnabled=TRUE NumberOfLogicalProcessors=4 NumberOfProcessors=1 OEMLogoBitmap= OEMStringArray={"$HP$","LOC#ABA","ABS 70/71 78 79 7A 7B","String4 for Original E quipment Manufacturer","HP_Mute_LED_0_A","String6 for Original Equipment Manufac turer","String7 for Original Equipment Manufacturer","String8 for Original Equip ment Manufacturer","FBYTE#3Q5F6b7K7P7W7jaBapaqasauawbhbpbzcbdUdpdq.r5;","BUILDID #15WW3HTT604#SABA#DABA;","String11 for Original Equipment Manufacturer"} PartOfDomain=FALSE PauseAfterReset=-1 PCSystemType=2 PCSystemTypeEx=2 PowerManagementCapabilities= PowerManagementSupported= PowerOnPasswordStatus=3 PowerState=0 PowerSupplyState=3 PrimaryOwnerContact= PrimaryOwnerName=nell@example.com ResetCapability=1 ResetCount=-1 ResetLimit=-1 Roles={"LM_Workstation","LM_Server","NT"} Status=OK SupportContactDescription= SystemFamily=103C_5335KV G=N L=CON B=HP SystemSKUNumber=P1A95UA#ABA SystemStartupDelay= SystemStartupOptions= SystemStartupSetting= SystemType=x64-based PC ThermalState=3 TotalPhysicalMemory=3708825600 UserName=LAPTOP-G6CRR45D\nell WakeUpType=6 Workgroup=WORKGROUP C:\Users\nell>
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 LAPTOP-G6CRR45D C:\Users\nell>
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 LAPTOP-G6CRR45D PS C:\Users\nell>