윈도우 호스트명 변경

1 개요[ | ]

Renaming a computer using WMIC
윈도우 호스트명 변경
  • 윈도우는 리눅스와 달리 재부팅해야만 적용된다.
  • 관리자 권한이 필요하다.

2 방법 1: wmic[ | ]

명령어
wmic ComputerSystem Where Name="%COMPUTERNAME%" Call Rename Name="호스트명"
실행예시
C:\Users\zetawiki>wmic ComputerSystem Where Name="%COMPUTERNAME%" Call Rename Name
="supercom"
Executing (\\JMNOTE-PC\ROOT\CIMV2:Win32_ComputerSystem.Name="JMNOTE-PC")->Rename
()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};
→ ReturnValue가 0이므로 성공[1]
→ 새로 지정한 호스트명 supercom은 재부팅 후 적용된다.

3 방법 2: reg add[ | ]

명령어
reg add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /d "호스트명" /f
reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /d "호스트명" /f
실행예시
C:\Users\zetawiki>reg add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\Comp
uterName" /v "ComputerName" /d "supercom" /f
작업을 완료했습니다.

C:\Users\zetawiki>reg add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters
" /v "NV Hostname" /d "supercom" /f
작업을 완료했습니다.

4 같이 보기[ | ]

5 주석[ | ]

  1. 시스템에서는 보통 0을 정상종료값으로 쓴다. 종료 스테이터스 참고

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}