-
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 [-LocalPath] <String[]> [[-RemotePath] <String>] [-Remove] [-TransferOptions <TransferOptions>]
-WinSCPSession <Session> [<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
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: (All)
Aliases: Path
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
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: (All)
Aliases: Destination
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
When set to true, deletes source local file(s) after transfer. Defaults to false.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Transfer options. Defaults to null, what is equivalent to New-WinSCPTransferOption.
Type: TransferOptions
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
It represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: 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.
System.String[]