< Back
Set-SCPItem
Post
NAME Set-SCPItem
SYNOPSIS
Upload an item, either file or directory to a remote system via SCP.
SYNTAX
Set-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-Path] <String> [-Destination] <String>
[-AcceptKey <Boolean>] [-ConnectionTimeout <Int32>] [-ErrorOnUntrusted] [-Force] [-KeyFile <String>] [-NewName
<String>] [-NoProgress] [-OperationTimeout <Int32>] [-Port <Int32>] [-ProxyCredential <PSCredential>] [-ProxyPort
<Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}] [<CommonParameters>]
Set-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-Path] <String> [-Destination] <String>
[-AcceptKey <Boolean>] [-ConnectionTimeout <Int32>] [-ErrorOnUntrusted] [-Force] [-KeyString <String[]>] [-NewName
<String>] [-NoProgress] [-OperationTimeout <Int32>] [-Port <Int32>] [-ProxyCredential <PSCredential>] [-ProxyPort
<Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}] [<CommonParameters>]
DESCRIPTION
Upload an item, either file or directory to a remote system via SCP.
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 on the remote system where to copy the Item.
Required? true
Position? 3
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 of the item to upload.
Required? true
Position? 2
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:\\> Set-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path .\\testcode -Destination /tmp -Verbose
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: Fingerprint for 192.168.1.169: 5a:a3:85:c6:63:83:6b:6c:2a:8f:9b:44:20:70:eb:7c
VERBOSE: Fingerprint matched trusted fingerprint for host 192.168.1.169
VERBOSE: Connection successful
VERBOSE: Uploading: C:\\testcode
VERBOSE: Destination: /tmp/testcode
Uploade a directory to the target folder.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs
SYNOPSIS
Upload an item, either file or directory to a remote system via SCP.
SYNTAX
Set-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-Path] <String> [-Destination] <String>
[-AcceptKey <Boolean>] [-ConnectionTimeout <Int32>] [-ErrorOnUntrusted] [-Force] [-KeyFile <String>] [-NewName
<String>] [-NoProgress] [-OperationTimeout <Int32>] [-Port <Int32>] [-ProxyCredential <PSCredential>] [-ProxyPort
<Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}] [<CommonParameters>]
Set-SCPItem [-ComputerName] <String[]> [-Credential] <PSCredential> [-Path] <String> [-Destination] <String>
[-AcceptKey <Boolean>] [-ConnectionTimeout <Int32>] [-ErrorOnUntrusted] [-Force] [-KeyString <String[]>] [-NewName
<String>] [-NoProgress] [-OperationTimeout <Int32>] [-Port <Int32>] [-ProxyCredential <PSCredential>] [-ProxyPort
<Int32>] [-ProxyServer <String>] [-ProxyType {HTTP | Socks4 | Socks5}] [<CommonParameters>]
DESCRIPTION
Upload an item, either file or directory to a remote system via SCP.
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 on the remote system where to copy the Item.
Required? true
Position? 3
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 of the item to upload.
Required? true
Position? 2
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:\\> Set-SCPItem -ComputerName 192.168.1.169 -Credential carlos -Path .\\testcode -Destination /tmp -Verbose
VERBOSE: Using SSH Username and Password authentication for connection.
VERBOSE: Fingerprint for 192.168.1.169: 5a:a3:85:c6:63:83:6b:6c:2a:8f:9b:44:20:70:eb:7c
VERBOSE: Fingerprint matched trusted fingerprint for host 192.168.1.169
VERBOSE: Connection successful
VERBOSE: Uploading: C:\\testcode
VERBOSE: Destination: /tmp/testcode
Uploade a directory to the target folder.
RELATED LINKS
Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs