ShellPrompt Parameter (Invoke-SSH Cmdlet)
Specifies the shell prompt to wait for.
Invoke-SSH -ShellPrompt string
If ShellPrompt is specified, the cmdlet will not use the SEXEC protocol, but instead will just request shell access and wait until the specified shell prompt comes 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.