< Back
Get-SCPItem
Post
NAME Get-SCPItem
SYNOPSIS
Download from a remote server via SCP a file or directory.
SYNTAX
Get-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-AcceptKey <Boolean>] [-ConnectionTimeout
<Int32>] -Destination <String> [-ErrorOnUntrusted] [-Force] [-KeyFile <String>] [-NewName <String>] [-NoProgress]
[-OperationTimeout <Int32>] -Path <String> -PathType {File | Directory} [-Port <Int32>] [-ProxyCredential
<PSCredential>] [-ProxyPort <Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}]
[<CommonParameters>]
Get-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-AcceptKey <Boolean>] [-ConnectionTimeout
<Int32>] -Destination <String> [-ErrorOnUntrusted] [-Force] [-KeyString <String[]>] [-NewName <String>]
[-NoProgress] [-OperationTimeout <Int32>] -Path <String> -PathType {File | Directory} [-Port <Int32>]
[-ProxyCredential <PSCredential>] [-ProxyPort <Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 |
Socks5}] [<CommonParameters>]
DESCRIPTION
Download from a remote server via SCP a file or directory.
PARAMETERS
-AcceptKey <Boolean>
Auto add host key fingerprint to the list of trusted host/gingerprint pairs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ComputerName <String[]>
FQDN or IP Address of host to establish a SSH connection.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConnectionTimeout <Int32>
Connection timeout interval.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Credential <PSCredential>
SSH Credentials to use for connecting to a server. If a key file is used the password field is used for the
Key pass phrase.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Destination <String>
Path to the location where to download the item to.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ErrorOnUntrusted [<SwitchParameter>]
Raise an exception if the fingerprint is not trusted for the host.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Do not check the remote host fingerprint.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyFile <String>
OpenSSH format SSH private key file.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyString <String[]>
String array of the content of a OpenSSH key file.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NewName <String>
New name for the item on the destination path.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
-OperationTimeout <Int32>
Timeout for execution of an operation.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <String>
Path to item on the remote host to download.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PathType <String>
What type of Item you are getting from the remote host via SCP.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Port <Int32>
SSH TCP Port number to use for the SSH connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyCredential <PSCredential>
PowerShell Credential Object with the credentials for use to connect to proxy server if required.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyPort <Int32>
Port to connect to on proxy server to route connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyServer <String>
Proxy server name or IP Address to use for connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyType <String>
Type of Proxy being used (HTTP, Socks4 or Socks5).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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.String[]
System.Management.Automation.PSCredential System.Int32 System.String System.Boolean
System.Management.Automation.SwitchParameter
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\> Get-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path "/var/log/dmesg" -PathType File
-Destination ./
Download in to the local path the dmesg file.
Example 2
PS C:\\> Get-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path "/var/log/dmesg" -PathType File
-Destination ./ -NewName dmesg_server_169
Download in to the local path the dmesg file and give it a different name.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs
SYNOPSIS
Download from a remote server via SCP a file or directory.
SYNTAX
Get-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-AcceptKey <Boolean>] [-ConnectionTimeout
<Int32>] -Destination <String> [-ErrorOnUntrusted] [-Force] [-KeyFile <String>] [-NewName <String>] [-NoProgress]
[-OperationTimeout <Int32>] -Path <String> -PathType {File | Directory} [-Port <Int32>] [-ProxyCredential
<PSCredential>] [-ProxyPort <Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}]
[<CommonParameters>]
Get-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-AcceptKey <Boolean>] [-ConnectionTimeout
<Int32>] -Destination <String> [-ErrorOnUntrusted] [-Force] [-KeyString <String[]>] [-NewName <String>]
[-NoProgress] [-OperationTimeout <Int32>] -Path <String> -PathType {File | Directory} [-Port <Int32>]
[-ProxyCredential <PSCredential>] [-ProxyPort <Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 |
Socks5}] [<CommonParameters>]
DESCRIPTION
Download from a remote server via SCP a file or directory.
PARAMETERS
-AcceptKey <Boolean>
Auto add host key fingerprint to the list of trusted host/gingerprint pairs.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ComputerName <String[]>
FQDN or IP Address of host to establish a SSH connection.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ConnectionTimeout <Int32>
Connection timeout interval.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Credential <PSCredential>
SSH Credentials to use for connecting to a server. If a key file is used the password field is used for the
Key pass phrase.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Destination <String>
Path to the location where to download the item to.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ErrorOnUntrusted [<SwitchParameter>]
Raise an exception if the fingerprint is not trusted for the host.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Do not check the remote host fingerprint.
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyFile <String>
OpenSSH format SSH private key file.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-KeyString <String[]>
String array of the content of a OpenSSH key file.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NewName <String>
New name for the item on the destination path.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
-OperationTimeout <Int32>
Timeout for execution of an operation.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <String>
Path to item on the remote host to download.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PathType <String>
What type of Item you are getting from the remote host via SCP.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Port <Int32>
SSH TCP Port number to use for the SSH connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyCredential <PSCredential>
PowerShell Credential Object with the credentials for use to connect to proxy server if required.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyPort <Int32>
Port to connect to on proxy server to route connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyServer <String>
Proxy server name or IP Address to use for connection.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyType <String>
Type of Proxy being used (HTTP, Socks4 or Socks5).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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.String[]
System.Management.Automation.PSCredential System.Int32 System.String System.Boolean
System.Management.Automation.SwitchParameter
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\> Get-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path "/var/log/dmesg" -PathType File
-Destination ./
Download in to the local path the dmesg file.
Example 2
PS C:\\> Get-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path "/var/log/dmesg" -PathType File
-Destination ./ -NewName dmesg_server_169
Download in to the local path the dmesg file and give it a different name.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs