-
Notifications
You must be signed in to change notification settings - Fork 30
Send WinSCPItem
Uploads one or more files from local directory to remote directory.
Send-WinSCPItem [-WinSCPSession] <Session> [-LocalPath] <String[]> [[-RemotePath] <String>] [[-TransferOptions] <TransferOptions>] [-Remove] [<CommonParameters>]
Uploads one or more files from local directory to remote directory.
PS C:\> Send-WinSCPItem -LocalPath ftpDoc3.txt
Destination: \
IsSuccess FileName
--------- --------
True ftpDoc3.txt
PS C:\> New-Item -Name NewItem.txt -ItemType File -Value "Hello World!"
Directory: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 7/5/2017 2:48 PM 12 NewItem.txt
PS C:\ Send-WinSCPItem -LocalPath NewItem.txt -Remove
Destination: \
IsSuccess FileName
--------- --------
True NewItem.txt
It represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: Set 1
Aliases:
Required: true
Position: 0
Default Value:
Pipeline Input: True (ByValue)
Full path to local file or directory to upload. Filename in the path can be replaced with Windows wildcard to select multiple files.
Type: String[]
Parameter Sets: Set 1
Aliases: Path
Required: true
Position: 1
Default Value:
Pipeline Input: True (ByPropertyName)
Full path to upload the file to. When uploading multiple files, the filename in the path should be replaced with operation mask or omitted (path ends with slash).
Type: String
Parameter Sets: Set 1
Aliases: Destination
Required: false
Position: 2
Default Value:
Pipeline Input: false
When set to true, deletes source local file(s) after transfer. Defaults to false.
Type: SwitchParameter
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
Transfer options. Defaults to null, what is equivalent to New-WinSCPTransferOption.
Type: TransferOptions
Parameter Sets: Set 1
Aliases:
Required: false
Position: 3
Default Value:
Pipeline Input: false
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
System.String[]
Generated by: PowerShell HelpWriter 2017 v2.1.36