[AWS]/ROG
[AWS] [활용] Powershell 로 윈도우 호스트명 변경
SAMSUNG CLOUD-OKY
2022. 4. 28. 14:54
반응형
I want to change the hostname of a computer from Batch (a.k.a. Command Prompt) or Powershell.
Initially I started research into using the wmic command. But running wmic /? on Windows 10 21H1 indicates it is now deprecated.
Then I looked at Get-WmiObject. But when I run man Get-WmiObject in PowerShell, the description indicates it has been "superseded" by Get-CimInstance.
Using the old Get-WmiObject command you could change your own computer's hostname with (Get-WmiObject Win32_ComputerSystem).Rename("New-Hostname").
What is a non-deprecated way to change your own Windows computer's hostname using Batch or PowerShell?
## SSM 활용
The PowerShell command Rename-Computer
Rename-Computer "new-hostname"
Admin privileges and a computer restart are required.
The command warns you if the length of the hostname is longer than 15 characters.
How do I change the hostname of a Windows PC with batch or powershell - Stack Overflow
반응형