SynopsisPings all hosts on a specified subnet and returns response information from each host.
- Ping-Subnet [-Subnet] [-Mask] [-Timeout]
DescriptionThe Ping-Subnet cmdlet sends a ping request to each host on a subnet specified by the user and returns the results. The ping requests are sent sequentially with a default timeout of 200 milliseconds.
- Subnet Ping all hosts on this subnet. Parameter will accept any IP address on the subnet.
- Mask The subnet mask for the specified subnet in dotted decimal format, such as 255.255.255.0.
- Timeout The timeout for each ping request in milliseconds. The default is 200. Valid values are 1 to 3500.
InputsPing-Subnet does not accept any inputs from the pipeline.
OutputsPing-Subnet outputs an array of Vexasoft.PingResponse objects, each representing the status of a pinged address.
NotesThe Ping-Subnet cmdlet requires that DNS services are available to resolve host names.
Example 1This command will ping all IP addresses on the 192.168.0.0 subnet and return status information for each. The default timeout of 200 milliseconds will be used:
Ping-Subnet -Subnet 192.168.0.0 -Mask 255.255.255.0
Example 2As with the above example, this command will ping all IP addresses on the 192.168.0.0 subnet, despite the fact that a host address has been given as the subnet address. You can specify either the base address of a subnet or a host within that subnet when using this cmdlet. All ping requests will still be made via your local computer. This cmdlet does not support pinging from remote computers at this time:
Ping-Subnet -Subnet 192.168.0.55 -Mask 255.255.255.0
Example 3This command will ping all IP addresses on the 192.168.0.0 subnet using the maximum timeout of 3500 milliseconds:
Ping-Subnet -Subnet 192.168.0.0 -Mask 255.255.255.0 -Timeout 3500