Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Test-Connection

Test-Connection - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Test-Connection


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

Syntax
Test-Connection [-ComputerName] <string[]> [[-Source] <string[]>] [-AsJob] [-Authentication {Default | None | Conne
ct | Call | Packet | PacketIntegrity | PacketPrivacy | Unchanged}] [-BufferSize <int>] [-Count <int>] [-Credential 
<PSCredential>] [-Delay <int>] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}] [-Quiet] 
[-ThrottleLimit <int>] [-TimeToLive <int>] [<CommonParameters>]

Description
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 particu
lar computer 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 comma
nd as 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 i
n Windows PowerShell, but you can use the Quiet parameter to force it to return only a Boolean value.