Project

Transferetto

Small PowerShell module with FTPS/SFTP functionality

Stars64
Forks15
Open issues10
PowerShell Gallery downloads12892266
Releasev1.0.0
Language: PowerShell Updated: 2026-02-14T21:19:42.0000000+00:00

Curated Examples

Capture an SSH shell transcript

Use Transferetto to retain and export a transcript from an interactive SSH shell.

This pattern is useful when you want to keep a readable record of what happened during an interactive shell workflow, especially for deployment or server troubleshooting.

It is adapted from the source example at Examples/Example26-SSHShellTranscript.ps1.

When to use this pattern

  • An automation runs several shell commands in sequence.
  • You want to review the shell dialogue after the fact.
  • The workflow should persist a transcript to disk for logs or investigation.

Example

Import-Module Transferetto

$sshClient = Connect-SSH -Server 'server.example.com' -Credential (Get-Credential)
$shell = New-SSHShell -SshClient $sshClient -PromptPattern '(?m)^[^@\r\n]+@[^:\r\n]+:.*[$#]\s?$'

Invoke-SSHShellCommand -ShellSession $shell -Command 'cd /var/www/html && ls -la'
Invoke-SSHShellCommand -ShellSession $shell -Command 'sudo systemctl status nginx --no-pager'

Get-SSHShellTranscript -ShellSession $shell -AsText
Export-SSHShellTranscript -ShellSession $shell -Path "$PSScriptRoot\Logs\ssh-session.log"

Close-SSHShell -ShellSession $shell
Disconnect-SSH -SshClient $sshClient

What this demonstrates

  • running multiple commands through one shell session
  • reading the accumulated transcript in text form
  • exporting the transcript for later review

Source