Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to upload from stream, and name remote file differently #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pnorms
Copy link

@pnorms pnorms commented Nov 14, 2018

This update adds the ability to upload a file directly from a stream IE:
$Users = Get-ADUser -Filter * | ConvertTo-Csv
$Stream = [IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes($Users))
Set-SFTPFile -SessionId $SFTPSession.SessionID -LocalFileStream $Stream -RemotePath "/upload/" -RemoteFileName "Users.CSV"

As well as allow the remote filename to be different from the local filename, IE:
Set-SFTPFile -SessionId $SFTPSession.SessionID -LocalFile "C:\temp\Users.csv" -RemotePath "/upload/" -RemoteFileName "Users2.csv"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant