Send-Ping Cmdlet
Parameters Output Objects Configuration Settings
The Send-Ping cmdlet encapsulates ICMP ECHO functionality, used to check whether there is a communications link between two computers.
Syntax
Send-Ping [parameters]
Remarks
This cmdlet will send an ICMP echo request packet to the remote host indicated by Server. The results of the ping will be returned in a PingResponse object.
The cmdlet operates synchronously by default (waits for a response before returning control to the caller), however, the cmdlet may also operate asynchronously (return control immediately), by setting Timeout to 0.
The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.
# send a ping
send-ping -server microsoft.com
# send 5 pings
send-ping -server nsoftware.com -count 5
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
LogFile | The location of a file to which debug information is written. |
Config | Specifies one or more configuration settings. |
Count | The number of packets to send to the remote host. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
PacketSize | The size of the packet to be sent. |
Server | The address of the Server. |
Timeout | The maximum time allowed for the operation. |
TimeToLive | The time to live (TTL) value for the ICMP packets sent by the cmdlet. |
TypeOfService | The type of the ICMP message sent as a ping request. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
PingResponse | Object returned in response to a Ping request. |
Configuration Settings
The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.
TimeoutInMilliseconds | The timeout is treated as milliseconds. |
IcmpDllTimeout | The timeout for the cmdlet when using the icmp.dll. |
MaxMessageSize | The maximum length of the messages that can be received. |
MulticastTTL | The time to live (TTL) value for multicast ICMP packets sent by the component. |
ReceiveAllMode | Enables a socket to receive all IPv4 or IPv6 packets on the network. |
TimeoutInMilliseconds | The timeout is treated as milliseconds. |
UseConnection | Determines whether to use a connected socket. |
UseICMPDLL | Use the icmp.dll included on Windows Systems. |
UseIPHLPDLL | Use the iphlpapi.dll included on Windows Systems. |
UseIPv6 | Whether to use IPv6. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
UseBackgroundThread | Whether threads created by the cmdlet are background threads. |
UseInternalSecurityAPI | Tells the cmdlet whether or not to use the system security libraries or an internal implementation. |