< Back
New-SSHShellStream
Post
NAME New-SSHShellStream
SYNOPSIS
Creates a SSH shell stream for a given SSH Session.
SYNTAX
New-SSHShellStream [-SessionId] <Int32> [-TerminalName <String>] [-Columns <Int32>] [-Rows <Int32>] [-Width
<Int32>] [-Height <Int32>] [-BufferSize <Int32>] [<CommonParameters>]
New-SSHShellStream [-SSHSession] <SshSession> [-TerminalName <String>] [-Columns <Int32>] [-Rows <Int32>] [-Width
<Int32>] [-Height <Int32>] [-BufferSize <Int32>] [<CommonParameters>]
DESCRIPTION
Creates a SSH shell stream for a given SSH Session.
PARAMETERS
-SessionId <Int32>
SSH Session Id for an existing session.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-TerminalName <String>
Name of the terminal.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Columns <Int32>
The columns
Required? false
Position? named
Default value 80
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Rows <Int32>
The rows.
Required? false
Position? named
Default value 24
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Width <Int32>
The width.
Required? false
Position? named
Default value 800
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Height <Int32>
The height.
Required? false
Position? named
Default value 600
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-BufferSize <Int32>
Size of the buffer.
Required? false
Position? named
Default value 1000
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SSHSession <SshSession>
SSH Session Object for an existing session.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Int32
System.String
SSH.SshSession
OUTPUTS
Renci.SshNet.ShellStream
NOTES
-------------------------- EXAMPLE 1 --------------------------
$SSHStream = New-SSHShellStream -Index 0
PS C:\\> $SSHStream.WriteLine("uname -a")
PS C:\\> $SSHStream.read()
Last login: Sat Mar 14 20:02:16 2015 from infidel01.darkoperator.com
[admin@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64
GNU/Linux
[admin@localhost ~]$
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs
SYNOPSIS
Creates a SSH shell stream for a given SSH Session.
SYNTAX
New-SSHShellStream [-SessionId] <Int32> [-TerminalName <String>] [-Columns <Int32>] [-Rows <Int32>] [-Width
<Int32>] [-Height <Int32>] [-BufferSize <Int32>] [<CommonParameters>]
New-SSHShellStream [-SSHSession] <SshSession> [-TerminalName <String>] [-Columns <Int32>] [-Rows <Int32>] [-Width
<Int32>] [-Height <Int32>] [-BufferSize <Int32>] [<CommonParameters>]
DESCRIPTION
Creates a SSH shell stream for a given SSH Session.
PARAMETERS
-SessionId <Int32>
SSH Session Id for an existing session.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-TerminalName <String>
Name of the terminal.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Columns <Int32>
The columns
Required? false
Position? named
Default value 80
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Rows <Int32>
The rows.
Required? false
Position? named
Default value 24
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Width <Int32>
The width.
Required? false
Position? named
Default value 800
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Height <Int32>
The height.
Required? false
Position? named
Default value 600
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-BufferSize <Int32>
Size of the buffer.
Required? false
Position? named
Default value 1000
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SSHSession <SshSession>
SSH Session Object for an existing session.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Int32
System.String
SSH.SshSession
OUTPUTS
Renci.SshNet.ShellStream
NOTES
-------------------------- EXAMPLE 1 --------------------------
$SSHStream = New-SSHShellStream -Index 0
PS C:\\> $SSHStream.WriteLine("uname -a")
PS C:\\> $SSHStream.read()
Last login: Sat Mar 14 20:02:16 2015 from infidel01.darkoperator.com
[admin@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64
GNU/Linux
[admin@localhost ~]$
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs