반응형
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
반응형
'[AWS] > ROG' 카테고리의 다른 글
[AWS] [S3 리스트 활용] list.html (0) | 2022.04.28 |
---|---|
[AWS] [S3 리스트 활용] live/list.html (0) | 2022.04.28 |
[AWS] Rclone을 사용하여 Windows에서 AWS S3 마운트 탑재 (0) | 2022.04.19 |
[AWS] [활용] CLI를 사용하여 ec2에서 s3로 업로드/다운로드 하기 (우분투 Ubuntu) (0) | 2022.04.18 |
[AWS] [활용] Application Load Balancer (ALB)의 경로 기반 라우팅 (0) | 2022.04.18 |
댓글