Skip to main content

Powershell: Test-NetConnection


PS C:\Users\tuyen> get-help Test-NetConnection

NAME
    Test-NetConnection

SYNTAX
    Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |
    Detailed}]  [<CommonParameters>]

    Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}
    [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]

    Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]
    [<CommonParameters>]

    Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]
    [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]


ALIASES
    TNC


REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        -- To download and install Help files for the module that includes this cmdlet, use Update-Help.

PS C:\Users\tuyen> Test-NetConnection -InformationLevel Detailed -ComputerName portquiz.net -Port 27017


ComputerName            : portquiz.net
RemoteAddress           : 178.33.250.62
RemotePort              : 27017
NameResolutionResults   : 178.33.250.62
MatchingIPsecRules      :
NetworkIsolationContext : Internet
IsAdmin                 : False
InterfaceAlias          : Ethernet
SourceAddress           : 192.168.64.66
NetRoute (NextHop)      : 192.168.64.1
TcpTestSucceeded        : True

Popular posts from this blog

Data Recovery Softwares

Follow 3-2-1 backup rule so you do not need these data recovery softwares.

Delete files older than 365 days

I must delete IIS *.log files in  older than 365 days. D:\Logs | -W3SVC1 -W3SVC2 -... -W3SVC33 daily-delete-logfiles-older-than-365-days.cmd :: Daily delete log files older than 365 days :: Created on: 20161120 :: Created by: :: Last modified on: :: Last modified by: :: History: SET DIRLOG=E:\_scripts\Logs\ :: Echo @path to test first :: FORFILES /P D:\Logs /S /M *.log /D -365 /C "cmd /c echo @path @fdate" :: Delete files ECHO "Begin" >> %dirlog%daily-delete-logfiles.log DATE /T >> %dirlog%daily-delete-logfiles.log TIME /T >> %dirlog%daily-delete-logfiles.log FORFILES /P D:\Logs /S /M *.log /D -365 /C "cmd /c del @path" >> %dirlog%daily-delete-logfiles.log ECHO "Finished" >> %dirlog%daily-delete-logfiles.log DATE /T >> %dirlog%daily-delete-logfiles.log TIME /T >> %dirlog%daily-delete-logfiles.log :: END of script /P : Path to folder /S: recurse into subdirectories /M *.l...

SoloLearn: Learn to Code for Free!

Got a minute? You can learn to code anywhere, anytime you can with your smartphone using Sololearn.