en-US/PSNetScanners.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Test-PingAsync</command:name>
      <command:verb>Test</command:verb>
      <command:noun>PingAsync</command:noun>
      <maml:description>
        <maml:para>Parallel ICMP scanner.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>`Test-PingAsync` is a PowerShell cmdlet that ICMP echo-requests in parallel using `Ping.SendPingAsync` Method (https://learn.microsoft.com/en-us/dotnet/api/system.net.networkinformation.ping.sendpingasync). In essence, it's like `Test-Connection` with less options but faster.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Test-PingAsync</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="ComputerName, HostName, Host, Server, Address">
          <maml:name>Target</maml:name>
          <maml:description>
            <maml:para>Specifies one or more remote computers, Uris or Ip addresses to test connectivity.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="bfs">
          <maml:name>BufferSize</maml:name>
          <maml:description>
            <maml:para>Specifies the size, in bytes, of the buffer sent with this command.</maml:para>
            <maml:para>&gt; [!NOTE] &gt; &gt; The default value is 32.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>32</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="timeout, to, ct">
          <maml:name>ConnectionTimeout</maml:name>
          <maml:description>
            <maml:para>Specifies a timeout in milliseconds for each async task.</maml:para>
            <maml:para>&gt; [!NOTE] &gt; &gt; - If a task is not completed after this timeout, the status will be `TimedOut`. &gt; - The default value for this parameter is `4000` (4 seconds).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>DontFragment</maml:name>
          <maml:description>
            <maml:para>This parameter sets the Don't Fragment flag in the IP header. See `PingOptions.DontFragment` Property (https://learn.microsoft.com/en-us/dotnet/api/system.net.networkinformation.pingoptions.dontfragment#system-net-networkinformation-pingoptions-dontfragment)for more information.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="dns">
          <maml:name>ResolveDns</maml:name>
          <maml:description>
            <maml:para>Causes the cmdlet to attempt to resolve the DNS name of the target.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="tl">
          <maml:name>ThrottleLimit</maml:name>
          <maml:description>
            <maml:para>Specifies the maximum number of async tasks to run in parallel.</maml:para>
            <maml:para>&gt; [!NOTE] &gt; &gt; The default value for `-ThrottleLimit` is `50`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Ttl</maml:name>
          <maml:description>
            <maml:para>Sets the maximum number of hops that an ICMP request message can be sent. The default value is controlled by the operating system. The default value for Windows 10 and higher is 128 hops.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="ComputerName, HostName, Host, Server, Address">
        <maml:name>Target</maml:name>
        <maml:description>
          <maml:para>Specifies one or more remote computers, Uris or Ip addresses to test connectivity.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="bfs">
        <maml:name>BufferSize</maml:name>
        <maml:description>
          <maml:para>Specifies the size, in bytes, of the buffer sent with this command.</maml:para>
          <maml:para>&gt; [!NOTE] &gt; &gt; The default value is 32.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>32</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="timeout, to, ct">
        <maml:name>ConnectionTimeout</maml:name>
        <maml:description>
          <maml:para>Specifies a timeout in milliseconds for each async task.</maml:para>
          <maml:para>&gt; [!NOTE] &gt; &gt; - If a task is not completed after this timeout, the status will be `TimedOut`. &gt; - The default value for this parameter is `4000` (4 seconds).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>DontFragment</maml:name>
        <maml:description>
          <maml:para>This parameter sets the Don't Fragment flag in the IP header. See `PingOptions.DontFragment` Property (https://learn.microsoft.com/en-us/dotnet/api/system.net.networkinformation.pingoptions.dontfragment#system-net-networkinformation-pingoptions-dontfragment)for more information.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="dns">
        <maml:name>ResolveDns</maml:name>
        <maml:description>
          <maml:para>Causes the cmdlet to attempt to resolve the DNS name of the target.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="tl">
        <maml:name>ThrottleLimit</maml:name>
        <maml:description>
          <maml:para>Specifies the maximum number of async tasks to run in parallel.</maml:para>
          <maml:para>&gt; [!NOTE] &gt; &gt; The default value for `-ThrottleLimit` is `50`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Ttl</maml:name>
        <maml:description>
          <maml:para>Sets the maximum number of hops that an ICMP request message can be sent. The default value is controlled by the operating system. The default value for Windows 10 and higher is 128 hops.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>PSNetScanners.PingResult</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>---- Example 1: Send parallel echo-requests to remote hosts ----</maml:title>
        <dev:code>Test-PingAsync google.com, github.com
 
Source Destination Address Latency Status DnsResult
------ ----------- ------- ------- ------ ---------
DESKTOP-1111111 google.com 142.251.133.206 8 ms Success
DESKTOP-1111111 github.com 20.201.28.151 37 ms Success</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-- Example 2: Attempt to resolve DNS name for multiple hosts --</maml:title>
        <dev:code>PS ..\PSNetScanners&gt; $result = Test-PingAsync 8.8.8.8, 8.8.4.4, 1.1.1.1 -ResolveDns
PS ..\PSNetScanners&gt; $result
 
Source Destination Address Latency Status DnsResult
------ ----------- ------- ------- ------ ---------
DESKTOP-1111111 8.8.8.8 8.8.8.8 8 ms Success dns.google
DESKTOP-1111111 8.8.4.4 8.8.4.4 8 ms Success dns.google
DESKTOP-1111111 1.1.1.1 1.1.1.1 8 ms Success one.one.one.one
 
PS ..\PSNetScanners&gt; $result[0].DnsResult
 
Status : Success
HostName : dns.google
AddressList : {8.8.8.8, 8.8.4.4}
Aliases : {}</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--- Example 3: Specify a connection timeout for each request ---</maml:title>
        <dev:code>PS ..\PSNetScanners&gt; 1..20 | ForEach-Object { "192.168.1.$_" } | Test-PingAsync -ConnectionTimeout 200
 
Source Destination Address Latency Status DnsResult
------ ----------- ------- ------- ------ ---------
DESKTOP-1111111 192.168.1.1 192.168.1.1 0 ms Success
DESKTOP-1111111 192.168.1.5 192.168.1.5 0 ms Success
DESKTOP-1111111 192.168.1.14 192.168.1.14 3 ms Success
DESKTOP-1111111 192.168.1.7 192.168.1.7 137 ms Success
DESKTOP-1111111 192.168.1.3 192.168.1.3 204 ms Success
DESKTOP-1111111 192.168.1.2 * * TimedOut
DESKTOP-1111111 192.168.1.4 * * TimedOut
DESKTOP-1111111 192.168.1.6 * * TimedOut
DESKTOP-1111111 192.168.1.8 * * TimedOut
DESKTOP-1111111 192.168.1.9 * * TimedOut
DESKTOP-1111111 192.168.1.10 * * TimedOut
DESKTOP-1111111 192.168.1.11 * * TimedOut
DESKTOP-1111111 192.168.1.12 * * TimedOut
...
...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>`Ping.SendPingAsync` Method</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/dotnet/api/system.net.networkinformation.ping.sendpingasync</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>`PingOptions.DontFragment` Property</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/dotnet/api/system.net.networkinformation.pingoptions.dontfragment#system-net-networkinformation-pingoptions-dontfragment</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>about_CommonParameters</maml:linkText>
        <maml:uri>http://go.microsoft.com/fwlink/?LinkID=113216</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Test-TcpAsync</command:name>
      <command:verb>Test</command:verb>
      <command:noun>TcpAsync</command:noun>
      <maml:description>
        <maml:para>Parallel TCP scanner.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>`Test-TcpAsync` is a PowerShell cmdlet that tests TCP connectivity in parallel using `TcpClient.ConnectAsync` Method (https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient.connectasync). In essence, it's like `Test-NetConnection` with `-Port` but faster.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Test-TcpAsync</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="ComputerName, HostName, Host, Server, Address">
          <maml:name>Target</maml:name>
          <maml:description>
            <maml:para>Specifies one or more remote computers, Uris or Ip addresses to test connectivity.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="1" aliases="p">
          <maml:name>Port</maml:name>
          <maml:description>
            <maml:para>Specifies one or many TCP ports to test connectivity to the specified targets.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
          <dev:type>
            <maml:name>Int32[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="timeout, to, ct">
          <maml:name>ConnectionTimeout</maml:name>
          <maml:description>
            <maml:para>Specifies a timeout in milliseconds for each async task.</maml:para>
            <maml:para>&gt; [!NOTE] &gt; &gt; - If a task is not completed after this timeout, the status will be `TimedOut`. &gt; - If your `-ConnectionTimeout` is greater than the maximum timeout of `TcpClient` (https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient)and the connection fails, the status will be `Closed`. &gt; - In both cases of a connectivity failure, the `.Details` property will be populated with a `SocketException`. &gt; - The default value for this parameter is `4000` (4 seconds).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>4000</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="tl">
          <maml:name>ThrottleLimit</maml:name>
          <maml:description>
            <maml:para>Specifies the maximum number of async tasks to run in parallel.</maml:para>
            <maml:para>&gt; [!NOTE] &gt; &gt; The default value for `-ThrottleLimit` is `50`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>50</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="ComputerName, HostName, Host, Server, Address">
        <maml:name>Target</maml:name>
        <maml:description>
          <maml:para>Specifies one or more remote computers, Uris or Ip addresses to test connectivity.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="1" aliases="p">
        <maml:name>Port</maml:name>
        <maml:description>
          <maml:para>Specifies one or many TCP ports to test connectivity to the specified targets.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
        <dev:type>
          <maml:name>Int32[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="timeout, to, ct">
        <maml:name>ConnectionTimeout</maml:name>
        <maml:description>
          <maml:para>Specifies a timeout in milliseconds for each async task.</maml:para>
          <maml:para>&gt; [!NOTE] &gt; &gt; - If a task is not completed after this timeout, the status will be `TimedOut`. &gt; - If your `-ConnectionTimeout` is greater than the maximum timeout of `TcpClient` (https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient)and the connection fails, the status will be `Closed`. &gt; - In both cases of a connectivity failure, the `.Details` property will be populated with a `SocketException`. &gt; - The default value for this parameter is `4000` (4 seconds).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>4000</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="tl">
        <maml:name>ThrottleLimit</maml:name>
        <maml:description>
          <maml:para>Specifies the maximum number of async tasks to run in parallel.</maml:para>
          <maml:para>&gt; [!NOTE] &gt; &gt; The default value for `-ThrottleLimit` is `50`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>50</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.Int32[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.String[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>PSNetScanners.TcpResult</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1: Test TCP connectivity on multiple ports for a specified host</maml:title>
        <dev:code>PS ..\&gt; Test-TcpAsync google.com 20, 25, 80, 443
 
Source Destination Client Port Status
------ ----------- ------ ---- ------
DESKTOP-1111111 google.com 142.251.134.14 80 Opened
DESKTOP-1111111 google.com 142.251.134.14 443 Opened
DESKTOP-1111111 google.com 20 TimedOut
DESKTOP-1111111 google.com 25 TimedOut</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Test TCP connectivity on multiple ports for multiple hosts</maml:title>
        <dev:code>PS ..\&gt; Test-TcpAsync google.com, github.com 20, 25, 80, 443
 
Source Destination Client Port Status
------ ----------- ------ ---- ------
DESKTOP-1111111 google.com 142.251.134.14 443 Opened
DESKTOP-1111111 google.com 142.251.134.14 80 Opened
DESKTOP-1111111 github.com 20.201.28.151 80 Opened
DESKTOP-1111111 github.com 20.201.28.151 443 Opened
DESKTOP-1111111 google.com 20 TimedOut
DESKTOP-1111111 google.com 25 TimedOut
DESKTOP-1111111 github.com 20 TimedOut
DESKTOP-1111111 github.com 25 TimedOut</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>------ Example 3: Specify a timeout for TCP connectivity ------</maml:title>
        <dev:code>PS ..\&gt; $result = Test-TcpAsync github.com 20, 80 -ConnectionTimeout 30000
PS ..\&gt; $result
 
Source Destination Client Port Status
------ ----------- ------ ---- ------
DESKTOP-1111111 github.com 20.201.28.151 80 Opened
DESKTOP-1111111 github.com 20 Closed
 
PS ..\&gt; $result.Details
 
Message : A connection attempt failed because the connected party did not properly respond after a period of
                  time, or established connection failed because connected host has failed to respond.
SocketErrorCode : TimedOut
ErrorCode : 10060
NativeErrorCode : 10060
TargetSite : Void ThrowException(System.Net.Sockets.SocketError, System.Threading.CancellationToken)
Data : {}
InnerException :
HelpLink :
Source : System.Net.Sockets
HResult : -2147467259
StackTrace : at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error,
                  CancellationToken cancellationToken)
                     at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTa
                  skSource.GetResult(Int16 token)
                     at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.&lt;&gt;c.&lt;.cctor&gt;b__4_0(Object state)
                  --- End of stack trace from previous location ---
                     at System.Net.Sockets.TcpClient.CompleteConnectAsync(Task task)
                     at PSNetScanners.TcpResult.CreateAsync(TcpInput input, Cancellation cancellation, Int32 timeout)
                  in D:\PSNetScanners\src\PSNetScanners\TcpResult.cs:line 64</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------------- Example 4: Use a CSV as input ----------------</maml:title>
        <dev:code>PS ..\&gt; Import-Csv targets.csv | Test-TcpAsync
 
Source Destination Client Port Status
------ ----------- ------ ---- ------
DESKTOP-1111111 google.com 142.251.133.206 80 Opened
DESKTOP-1111111 google.com 142.251.133.206 443 Opened
DESKTOP-1111111 github.com 20.201.28.151 443 Opened
DESKTOP-1111111 github.com 20.201.28.151 80 Opened
DESKTOP-1111111 amazon.com 52.94.236.248 443 Opened
DESKTOP-1111111 cisco.com 72.163.4.185 443 Opened
DESKTOP-1111111 cisco.com 72.163.4.185 80 Opened
DESKTOP-1111111 amazon.com 52.94.236.248 80 Opened</dev:code>
        <dev:remarks>
          <maml:para>&gt; [!TIP] &gt; &gt; Both parameters `-Target` and `-Port` take value from pipeline by property name, if your CSV headers match the parameters names or their aliases, you can use a CSV as input for this cmdlet.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>`TcpClient.ConnectAsync` Method</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient.connectasync</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>`TcpClient`</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.tcpclient</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>about_CommonParameters</maml:linkText>
        <maml:uri>http://go.microsoft.com/fwlink/?LinkID=113216</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>