< Back
Get-SFTPItem
Post
NAME Get-SFTPItem
SYNOPSIS
Downloads via SFTP an item from a SSH server.
SYNTAX
Get-SFTPItem [-SFTPSession] <SftpSession[]> [-Destination] <String> [-Path] <String[]> [[-Force]] [[-SkipSymLink]]
[-NoProgress] [<CommonParameters>]
Get-SFTPItem [-SessionId] <Int32[]> [-Destination] <String> [-Path] <String[]> [[-Force]] [[-SkipSymLink]]
[-NoProgress] [<CommonParameters>]
DESCRIPTION
Downloads via SFTP an item from a SSH server. An Item can be a directory or a file.
PARAMETERS
-Destination <String>
Local path where to download item to.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Overrite item on the local host if it already pressent.
Required? false
Position? 3
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-NoProgress [<SwitchParameter>]
Do not show upload progress.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <String[]>
Remote path of item to download.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-SFTPSession <SftpSession[]>
Existing SFTPSession object.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SessionId <Int32[]>
Session Id of an existing SFTPSession.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SkipSymLink [<SwitchParameter>]
Do not follow symboliclinks if present in a directory.
Required? false
Position? 4
Default value False
Accept pipeline input? False
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[]
SSH.SftpSession[] System.String[] System.String System.Management.Automation.SwitchParameter
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\>Get-SFTPItem -SessionId 0 -Path .ssh -Destination ./ -Verbose
Downloads the .ssh folder from the server to the current directory.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs
SYNOPSIS
Downloads via SFTP an item from a SSH server.
SYNTAX
Get-SFTPItem [-SFTPSession] <SftpSession[]> [-Destination] <String> [-Path] <String[]> [[-Force]] [[-SkipSymLink]]
[-NoProgress] [<CommonParameters>]
Get-SFTPItem [-SessionId] <Int32[]> [-Destination] <String> [-Path] <String[]> [[-Force]] [[-SkipSymLink]]
[-NoProgress] [<CommonParameters>]
DESCRIPTION
Downloads via SFTP an item from a SSH server. An Item can be a directory or a file.
PARAMETERS
-Destination <String>
Local path where to download item to.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Overrite item on the local host if it already pressent.
Required? false
Position? 3
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-NoProgress [<SwitchParameter>]
Do not show upload progress.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <String[]>
Remote path of item to download.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-SFTPSession <SftpSession[]>
Existing SFTPSession object.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SessionId <Int32[]>
Session Id of an existing SFTPSession.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SkipSymLink [<SwitchParameter>]
Do not follow symboliclinks if present in a directory.
Required? false
Position? 4
Default value False
Accept pipeline input? False
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[]
SSH.SftpSession[] System.String[] System.String System.Management.Automation.SwitchParameter
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\>Get-SFTPItem -SessionId 0 -Path .ssh -Destination ./ -Verbose
Downloads the .ssh folder from the server to the current directory.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs