< Back

Set-SCPFile

Sat Jan 18, 2020 7:59 pm

NAME Set-SCPFile



SYNOPSIS

Copies a file to a SSH server using SCP.





SYNTAX

Set-SCPFile [-ComputerName] <String[]> [-Credential] <PSCredential> [-LocalFile] <String> [-RemotePath] <String>

[-Port <Int32>] [-ProxyServer <String>] [-ProxyPort <Int32>] [-ProxyCredential <PSCredential>] [-ProxyType

<String>] [-OperationTimeout <Int32>] [-ConnectionTimeout <Int32>] [-AcceptKey <Boolean>] [-Force]

[-ErrorOnUntrusted] [-NoProgress] [-KeyFile <String>] [<CommonParameters>]



Set-SCPFile [-ComputerName] <String[]> [-Credential] <PSCredential> [-LocalFile] <String> [-RemotePath] <String>

[-Port <Int32>] [-ProxyServer <String>] [-ProxyPort <Int32>] [-ProxyCredential <PSCredential>] [-ProxyType

<String>] [-OperationTimeout <Int32>] [-ConnectionTimeout <Int32>] [-AcceptKey <Boolean>] [-Force]

[-ErrorOnUntrusted] [-NoProgress] [-KeyString <String[]>] [<CommonParameters>]





DESCRIPTION

Copies a specified file to a SSH Server using SCP given its full path and name.





PARAMETERS

-ComputerName <String[]>

FQDN or IP Address of host to establish a SCP Session.



Required? true

Position? 0

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 passphrase.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Port <Int32>

SSH TCP Port number to use for the SCP 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



-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



-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



-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



-LocalFile <String>

Full path and file name on the local system of the file to upload.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-RemotePath <String>

@{Text=}



Required? true

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-OperationTimeout <Int32>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ConnectionTimeout <Int32>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AcceptKey <Boolean>

Automatically accepts a new SSH fingerprint for a host,



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Do not perform any host key validation of the host.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ErrorOnUntrusted [<SwitchParameter>]

Throw a terminating error if the host key is not a trusted one.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-NoProgress [<SwitchParameter>]

Dont show a progress bar during uploading of the file.



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[]>

OpenSSH key in a string array to be used for authentication.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? true



<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







OUTPUTS



NOTES









Example 1



PS C:\\> {{ Add example code here }}



{{ Add example description here }}



RELATED LINKS

Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs