You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Windows Core Series, what’s my name and how do I change it?
When running these commands or using them in scripts keep in mind that some may become deprecated in future versions of Windows. Best practice is to use the PowerShell commands when possible to future proof any script that use these commands. These commands were run on Windows Server 2012R2.
When running Windows Server 2012+ without a GUI note that the GUI can be reinstalled via PowerShell (Install-WindowsFeature) and a reboot.
From Windows Server core command prompt:
C:>HOSTNAME
Or
C:>ECHO %COMPUTERNAME%
Or
C:>POWERSHELL
PS C:>$dns=Get-DnsClient|select Hostname;$dns[0]
Or
C:>IPCONFIG /ALL
Or
C:>WMIC COMPUTERSYSTEM LIST BRIEF
Or
C:>NETDOM COMPUTERNAME . /ENUMERATE
*Will show any alternate names added via NETDOM.
To change the local computer name (Non-Domain):
C:>WMIC COMPUTERSYSTEM WHERE NAME=”%COMPUTERNAME%” RENAME NAME=”2012R2Core”
Running Windows Core Series, what’s my name and how do I change it?
When running these commands or using them in scripts keep in mind that some may become deprecated in future versions of Windows. Best practice is to use the PowerShell commands when possible to future proof any script that use these commands. These commands were run on Windows Server 2012R2.
When running Windows Server 2012+ without a GUI note that the GUI can be reinstalled via PowerShell (Install-WindowsFeature) and a reboot.
From Windows Server core command prompt:
C:>HOSTNAME
Or
C:>ECHO %COMPUTERNAME%
Or
C:>POWERSHELL
PS C:>$dns=Get-DnsClient|select Hostname;$dns[0]
Or
C:>IPCONFIG /ALL
Or
C:>WMIC COMPUTERSYSTEM LIST BRIEF
Or
C:>NETDOM COMPUTERNAME . /ENUMERATE
*Will show any alternate names added via NETDOM.
To change the local computer name (Non-Domain):
C:>WMIC COMPUTERSYSTEM WHERE NAME=”%COMPUTERNAME%” RENAME NAME=”2012R2Core”
Or
C:>POWERSHELL
PS C:>Rename-Computer -NewName 2012R2Core2 -ComputerName .
Change the computer name (Domain joined):
C:>POWERSHELL
PS C:>Rename-Computer -NewName 2012R2Core2 -ComputerName . -DomainCredential domainuser
If you know any other interesting ways of getting this information from a Windows Server core installation post below.
The text was updated successfully, but these errors were encountered: