ShellPromptExpression Parameter (Connect-Telnet Cmdlet)

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


Connect-Telnet -ShellPromptExpression string


If ShellPromptExpression is specified, the cmdlet will not use the SEXEC protocol, but instead will just request shell access and wait until a shell prompt that matches the specified regular expression come up. Commands will then be executed through the shell instead of the SExec mechanism, which allows multiple commands sent over a single connection to share state on the server.

Note: The value specified in ShellPromptExpression must be a properly formatted regular expression.

Default Value


Copyright (c) 2022 /n software inc. - All rights reserved.
NetCmdlets 2020 - Version 20.0 [Build 8165]