Giter Site home page Giter Site logo

winscp's Introduction

WinSCP PowerShell Module Wrapper

Build status

Use at your own risk.

This module can be installed from the PowerShellGet Gallery, You need WMF 5 to use this feature.

# Inspect
Save-Module -Name WinSCP -Path <Path>

# Install
Install-Module -Name WinSCP

WinSCP Cmdlets

Examples

Example 1:

# Capture credentials.
$credential = Get-Credential

# Create new WinSCP session using captured credentials.
# New-WinSCPSession sets the PSDefaultParameterValue of the WinSCPSession parameter for all other cmdlets to this WinSCP.Session object.
# You can set it to a variable if you would like, but it is only necassary if you will have more then one session open at a time.
New-WinSCPSession -Credential $credential -HostName $env:COMPUTERNAME -Protocol Ftp

# Use that session to create a new Directory.
New-WinSCPItem -Path './remoteDirectory' -ItemType Directory

# Upload a file to the directory.
Send-WinSCPItem -Path 'C:\localDirectory\localFile.txt' -Destination '/remoteDirectory/'

# Close the session object.
Remove-WinSCPSession

Example 2:

# Create session, download a file, and close the session in one line.
# If the WinSCP.Session Object is passed through the pipeline it will be auto-closed upon the completion of that command.
New-WinSCPSession -Credential (Get-Credential) -HostName $env:COMPUTERNAME -Protocol Ftp | Receive-WinSCPItem -Path './file.txt' -Destination 'C:\folder\'

This is still a beta version, with most of the functionality available with WinSCP, I intend on developing this extensively.

Check back regularly for updates.

This project is licensed with GNU GENERAL PUBLIC LICENSE.

winscp's People

Contributors

dotps1 avatar

Watchers

James Cloos avatar Isaac Springer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.