Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Test-Connection

Test-Connection - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Sends ICMP echo request packets ("pings") to one or more computers.

Test-Connection [-ComputerName] <String[]> [-AsJob] [-Authentication <AuthenticationLevel>] [-BufferSize <Int32>] [-Cou
nt <Int32>] [-Delay <Int32>] [-Impersonation <ImpersonationLevel>] [-ThrottleLimit <Int32>] [-TimeToLive <Int32>] [<Com
Test-Connection [-ComputerName] <String[]> [-Source] <String[]> [-AsJob] [-Authentication <AuthenticationLevel>] [-Buff
erSize <Int32>] [-Count <Int32>] [-Credential <PSCredential>] [-Delay <Int32>] [-Impersonation <ImpersonationLevel>] [-
ThrottleLimit <Int32>] [-TimeToLive <Int32>] [<CommonParameters>]
Test-Connection [-ComputerName] <String[]> [-Authentication <AuthenticationLevel>] [-BufferSize <Int32>] [-Count <Int32
>] [-Delay <Int32>] [-Impersonation <ImpersonationLevel>] [-Quiet] [-TimeToLive <Int32>] [<CommonParameters>]

The Test-Connection cmdlet sends Internet Control Message Protocol (ICMP) echo request packets ("pings") to one or more
 remote computers and returns the echo response replies. You can use this cmdlet to determine whether a particular comp
uter can be contacted across an Internet Protocol (IP) network.

You can use the parameters of Test-Connection to specify both the sending and receiving computers, to run the command a
s a background job, to set a timeout and number of pings, and to configure the connection and authentication.

Unlike the traditional "ping" command, Test-Connection returns a Win32_PingStatus object that you can investigate in Wi
ndows PowerShell, but you can use the Quiet parameter to force it to return only a Boolean value.