This project is read-only.
To use the solution simply download the ps1 file, (read and understand it) and execute from powershell console.

The following parameters can be specified:

The source of the Endpoints:

  • EndpointList: name of the file holding the endpoint list in csv format (the delimiter can be specified also)
  • EndpointString: a (probably multi lined) string holding the endpoint list (Like the content of a csv file)
  • EndpointArray: a string array holding the endpoint list (like the result of Get-Content commandlet)

You should specify only one of the above parameters, but you can specify more. If more than one is specified the order of the priority is:
  • EndpointArray if specified (all other source will be ignored)
  • EndpointList if specified then EndpointString will be ignored
  • EndpointString will be used if no other source is specified.

Other parameters:

  • HostNamePos: the 0 based position of the hostname in each line of the Endpoint list (default is 1!)
  • PortPos: the 0 based position of the port in each line of Endpoint list (default is 2!)
  • MaxNumberOfConnections: the maximum number of simultaneous connections to remote endpoints. (default is 500). Be avare changing this number as each connection requires local resources like memory and a free source port on the local host.
  • WaitMillisec: the number of milliseconds the process will wait any time it needs to wait. (default is 100 ms)
  • Delimiter: the delimiter used to separate fields in each line of endpoint list. (default is ";")
  • AddHostname: if specified, the resulting csv will contain the local host name in the first field as source. Better to use when running the command on several different host to be able to compare the results in an aggregated csv file.

Result handling parameters

  • OutFile: a filename or full path to save the result into it. (if omitted, the std-out will be used.)
  • Append: if specified, the result will be appended to the end of the file.

The result

The result is a csv content written out to the console or to the specified file with the specified delimiter, in the following format:
[<Hostname>,]<the line from the endpoint list>,OPEN | closed | Error:<error message>
where
  • <Hostname> is the name of the local host and added only if specified by the AddHostname parameter
  • OPEN if the connection was succesfull,
  • closed if the connection could not be established
  • Error and the error message if there were error resolving the given name to IP address.

Last edited Mar 16 at 8:21 AM by placa, version 3