다음을 통해 공유


netsh

로컬 또는 원격으로 현재 실행 중인 컴퓨터의 네트워크 구성을 표시하거나 수정할 수 있는 네트워크 셸 명령줄 스크립팅 유틸리티입니다. 이 유틸리티는 명령 프롬프트 또는 Windows PowerShell에서 시작할 수 있습니다.

Syntax

netsh [-a <Aliasfile>][-c <Context>][-r <Remotecomputer>][-u [<domainname>\<username>][-p <Password> | [{<NetshCommand> | -f <scriptfile>}]

Parameters

Parameter Description
-ᅡ <Aliasfile> Aliasfile을 실행한 후 netsh 프롬프트로 돌아가도록 지정하고 하나 이상의 netsh 명령이 포함된 텍스트 파일의 이름을 지정합니다.
-씨 <Context> netsh가 지정된 netsh 컨텍스트와 입력할 netsh 컨텍스트를 입력하도록 지정합니다.
-아르 자형 <Remotecomputer> 구성할 원격 컴퓨터를 지정합니다.

Important: If you use this parameter, you must make sure the Remote Registry service is running on the remote computer. 실행 중이 아닌 경우 Windows에 “네트워크 경로를 찾을 수 없음” 오류 메시지가 표시됩니다.

-유 <domainname>\<username> 사용자 계정으로 netsh 명령을 실행할 때 사용할 도메인 및 사용자 계정 이름을 지정합니다. 도메인을 생략하면 기본적으로 로컬 도메인이 사용됩니다.
-피 <Password> -u <username> 매개변수로 지정된 사용자 계정의 비밀번호를 지정합니다.
<NetshCommand> 실행할 netsh 명령을 지정합니다.
-에프 <scriptfile> 지정된 스크립트 파일을 실행한 후 netsh 명령을 종료합니다.
/? 명령 프롬프트에 도움말을 표시합니다.

Remarks

  • If you specify -r followed by another command, netsh runs the command on the remote computer and then returns to the Cmd.exe command prompt. If you specify -r without another command, netsh opens in remote mode. The process is similar to using set machine at the Netsh command prompt. When you use -r, you set the target computer for the current instance of netsh only. netsh를 종료하고 다시 입력하면 대상 컴퓨터가 로컬 컴퓨터로 다시 설정됩니다. WINS에 저장된 컴퓨터 이름, UNC 이름, DNS 서버에서 확인할 인터넷 이름 또는 IP 주소를 지정하여 원격 컴퓨터에서 netsh 명령을 실행할 수 있습니다.

  • 문자열 값에 문자 사이에 공백이 있는 경우 문자열 값을 따옴표로 묶어야 합니다. 예를 들어 -r "contoso remote device"