tomohulk / WinSCP

WinSCP PowerShell Wrapper Module
GNU General Public License v3.0
156 stars 30 forks source link

WinSCPSession is now a required parameter for most cmdlets, examples do not reflect this #100

Closed jeffreymcclain closed 5 years ago

jeffreymcclain commented 5 years ago

Issue Description

When you standardized positional bindings (https://github.com/dotps1/WinSCP/commit/d13c883a18d322b5fb06303bca29f261dfeb970b), the WinSCPSession parameter became required for multiple cmdlets, but the examples were not updated to reflect this.

Example

WinSCP-PowerShell Version

5.13.9.1

dotps1 commented 5 years ago

The -WinSCPSession parameter has always been mandatory, and is explicitly defined as such in the parameter attirubtes. It is also reflected in the syntax on the help pages: -WinSCPSession . As there is no square brackets around the parameter, this indicates it is mandatory. However, none of the examples have that value because I use the $GlobalParameterBinding functionality to automatically bind the value from New-WinSCPSession to that parameter value on all commands in the WinSCP Module so you don't have to save it as a variable and reuse it. I am going to leave the examples the way are. You are correct the examples don't reflect the parameter being mandatory, but syntax definition is correct.