Test-NetConnection
Test-NetConnection
Displays diagnostic information for a connection.
구문
Parameter Set: CommonTCPPort
Test-NetConnection [[-ComputerName] <String> ] [-CommonTCPPort] <String> {HTTP | RDP | SMB | WINRM} [-InformationLevel <String> {Quiet | Detailed} ] [ <CommonParameters>]
Parameter Set: ICMP
Test-NetConnection [[-ComputerName] <String> ] [-Hops <Int32> ] [-InformationLevel <String> {Quiet | Detailed} ] [-TraceRoute] [ <CommonParameters>]
Parameter Set: RemotePort
Test-NetConnection [[-ComputerName] <String> ] -Port <Int32> [-InformationLevel <String> {Quiet | Detailed} ] [ <CommonParameters>]
자세한 설명
The Test-NetConnection cmdlet displays diagnostic information for a connection. The output includes the results of a DNS lookup, a listing of IP interfaces, an option to test a TCP connection, IPsec rules, and confirmation of connection establishment.
매개 변수
-CommonTCPPort<String>
Specifies the common service TCP port number. 이 매개 변수에 허용되는 값은 다음과 같습니다.
-- SMB
-- HTTP
-- RDP
-- PING
별칭 |
none |
필수 여부 |
true |
위치 |
2 |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ComputerName<String>
Specifies the Domain Name System (DNS) name or IP address of the target computer that runs the Dynamic Host Configuration Protocol (DHCP) server service.
별칭 |
RemoteAddress,cn |
필수 여부 |
false |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByValue, ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Hops<Int32>
Specifies the number of hops to traverse in a trace route command.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-InformationLevel<String>
Specifies the information level. 이 매개 변수에 허용되는 값은 다음과 같습니다.
-- Detailed
-- Quiet
If you set this parameter to Quiet, the cmdlet returns a Boolean value that indicates if the attempt to ping a host or port succeeded.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Port<Int32>
Specifies the TCP port number on the remote computer. The cmdlet uses this port number to test connectivity to the remote machine.
별칭 |
RemotePort |
필수 여부 |
true |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-TraceRoute
Indicates that Tracert runs to test connectivity to the remote host.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)
입력
입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.
- None
출력
출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.
NetConnectionResults
Results of the connectivity test to the specified computer name.
예
Example 1: Test a connection
This command tests a network connection.
PS C:\> Test-NetConnection
Example 2: Test a connection and display detailed results
This command tests a network connection and sets the InformationLevel parameter to Detailed.
PS C:\> Test-NetConnection -Port 80 -InformationLevel Detailed
Example 3: Test a connection to a remote host
This command tests a network connection to a remote host named www.contoso.com.
PS C:\> Test-NetConnection -ComputerName www.contoso.com -InformationLevel Detailed