Connect-TelnetCmdlet

Parameters   Output Objects   Config Settings  

The Connect-Telnet cmdlet is used to create a persistent connection object.

Syntax

$cnn = Connect-Telnet [parameters]

Remarks

This cmdlet allows you to create a persistent connection object to be used with related cmdlets.

When executing the cmdlet a connection object is returned. Pass this object to the Connection parameter of related cmdlets to use the newly created connection object.

To disconnect call Disconnect-Telnet.

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

LogFileThe location of a file to which debug information is written.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for user/password authentication.
EOLThe EOL used to parse the response.
FirewallHostName or IP address of firewall.
FirewallPasswordA password if authentication is to be used when connecting through the firewall.
FirewallPortThe port of the firewall to which to connect.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
LoginPromptThe format of the prompt for the user's login.
NoAuthenticationDisables authentication during connection.
PasswordThe password to use for authentication.
PasswordPromptThe format of the prompt for the user's password.
PortThe port to be used.
ServerThe address of the Server.
ShellPromptThe shell prompt on the remote shell on which the telnet connection is established.
ShellPromptExpressionA regular expression to match the shell prompt returned by the server.
TimeoutThe maximum time allowed for the operation.
UserThe username to use for authentication.

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.

TelnetConnectionThe connection object.

Config Settings


The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.

ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

LogFile Parameter (Connect-Telnet Cmdlet)

The location of a file to which debug information is written.

Syntax

Connect-Telnet -LogFile string

Remarks

When specified, the cmdlet will log debug information to the file. If the file exists, the information will be appended.

Default Value

null

Command Parameter (Connect-Telnet Cmdlet)

The command to be sent to the server.

Syntax

Connect-Telnet -Command string

Remarks

Default Value

""

Parameter Position

2

This is a required parameter.

Config Parameter (Connect-Telnet Cmdlet)

Specifies one or more configuration settings.

Syntax

Connect-Telnet -Config string[]

Remarks

Default Value

null

Credential Parameter (Connect-Telnet Cmdlet)

The PSCredential object to use for user/password authentication.

Syntax

Connect-Telnet -Credential PSCredential

Remarks

Default Value

null

Parameter Position

1

Parameter Alias

auth

EOL Parameter (Connect-Telnet Cmdlet)

The EOL used to parse the response.

Syntax

Connect-Telnet -EOL string

Remarks

Default Value

"\r"

FirewallHost Parameter (Connect-Telnet Cmdlet)

Name or IP address of firewall.

Syntax

Connect-Telnet -FirewallHost string

Remarks

Default Value

""

FirewallPassword Parameter (Connect-Telnet Cmdlet)

A password if authentication is to be used when connecting through the firewall.

Syntax

Connect-Telnet -FirewallPassword string

Remarks

Default Value

""

FirewallPort Parameter (Connect-Telnet Cmdlet)

The port of the firewall to which to connect.

Syntax

Connect-Telnet -FirewallPort int

Remarks

Default Value

0

FirewallType Parameter (Connect-Telnet Cmdlet)

Determines the type of firewall to connect through.

Syntax

Connect-Telnet -FirewallType string

Remarks

Default Value

0

FirewallUser Parameter (Connect-Telnet Cmdlet)

A user name if authentication is to be used connecting through a firewall.

Syntax

Connect-Telnet -FirewallUser string

Remarks

Default Value

""

LocalIP Parameter (Connect-Telnet Cmdlet)

The IP address of the local interface to use.

Syntax

Connect-Telnet -LocalIP string

Remarks

Default Value

""

Parameter Alias

LocalAddress

LogFile Parameter (Connect-Telnet Cmdlet)

The location of a file to which debug information is written.

Syntax

Connect-Telnet -LogFile string

Remarks

Default Value

""

LoginPrompt Parameter (Connect-Telnet Cmdlet)

The format of the prompt for the user's login.

Syntax

Connect-Telnet -LoginPrompt string

Remarks

Default Value

"Login:"

Parameter Position

4

NoAuthentication Parameter (Connect-Telnet Cmdlet)

Disables authentication during connection.

Syntax

Connect-Telnet -NoAuthentication SwitchParameter

Remarks

Default Value

false

Password Parameter (Connect-Telnet Cmdlet)

The password to use for authentication.

Syntax

Connect-Telnet -Password string

Remarks

Default Value

""

PasswordPrompt Parameter (Connect-Telnet Cmdlet)

The format of the prompt for the user's password.

Syntax

Connect-Telnet -PasswordPrompt string

Remarks

Default Value

"Password:"

Parameter Position

5

Port Parameter (Connect-Telnet Cmdlet)

The port to be used.

Syntax

Connect-Telnet -Port int

Remarks

Default Value

23

Server Parameter (Connect-Telnet Cmdlet)

The address of the Server.

Syntax

Connect-Telnet -Server string

Remarks

Default Value

""

Parameter Position

0

This is a required parameter.

ShellPrompt Parameter (Connect-Telnet Cmdlet)

The shell prompt on the remote shell on which the telnet connection is established.

Syntax

Connect-Telnet -ShellPrompt string

Remarks

Default Value

""

Parameter Position

3

Parameter Alias

Prompt

ShellPromptExpression Parameter (Connect-Telnet Cmdlet)

A regular expression to match the shell prompt returned by the server.

Syntax

Connect-Telnet -ShellPromptExpression string

Remarks

Default Value

""

Timeout Parameter (Connect-Telnet Cmdlet)

The maximum time allowed for the operation.

Syntax

Connect-Telnet -Timeout int

Remarks

Default Value

10

User Parameter (Connect-Telnet Cmdlet)

The username to use for authentication.

Syntax

Connect-Telnet -User string

Remarks

Default Value

""

TelnetConnection Output Object (Connect-Telnet Cmdlet)

The connection object.

Syntax

Object TelnetConnection {
   string[] Config;
   PSCredential Credential;
   string EOL;
   string FirewallHost;
   string FirewallPassword;
   int FirewallPort;
   string FirewallType;
   string FirewallUser;
   string LocalIP;
   string LogFile;
   string LoginPrompt;
   SwitchParameter NoAuthentication;
   string Password;
   string PasswordPrompt;
   int Port;
   string Server;
   string ShellPrompt;
   string ShellPromptExpression;
   int Timeout;
   string User;
}

Remarks

This object holds the connection. It may be passed to the Connection parameter of related cmdlets.

Config Settings (Connect-Telnet Cmdlet)

TCPClient Config Settings

Linger:  
LocalHost:  
LocalPort:  
UseIPv6:  

Socket Config Settings

Base Config Settings

BuildInfo:  
CodePage:  
LicenseInfo:  
MaskSensitive:  
UseInternalSecurityAPI: