prettify the parameters

This commit is contained in:
pinguinfuss 2023-03-09 13:09:15 +01:00
parent 79a1a214c2
commit 56727afa3e

View File

@ -73,19 +73,21 @@ function Connect-To {
#> #>
[CmdletBinding(DefaultParameterSetName = 'Private')] [CmdletBinding(DefaultParameterSetName = 'Private')]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute( [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSAvoidGlobalVars', 'PSAvoidGlobalVars',
'', '',
Justification = 'Wrapping existing var from WinSCP module.' Justification = 'Wrapping existing var from WinSCP module.'
)] )]
param ( param (
[Parameter(Mandatory = $true, ParameterSetName = 'Shared')] [Parameter(Mandatory = $true, ParameterSetName = 'Shared')]
[Parameter(Mandatory = $true, ParameterSetName = 'Private')] [Parameter(Mandatory = $true, ParameterSetName = 'Private')]
[string]$RemoteHost, [string] $RemoteHost,
[Parameter(Mandatory = $false, ParameterSetName = 'Shared')] [Parameter(Mandatory = $false, ParameterSetName = 'Shared')]
[Parameter(Mandatory = $false, ParameterSetName = 'Private')] [Parameter(Mandatory = $false, ParameterSetName = 'Private')]
[string]$Identifier, [string] $Identifier,
[Parameter(Mandatory = $true, ParameterSetName = 'Shared')] [Parameter(Mandatory = $true, ParameterSetName = 'Shared')]
[Parameter(Mandatory = $true, ParameterSetName = 'Private')] [Parameter(Mandatory = $true, ParameterSetName = 'Private')]
@ -100,22 +102,22 @@ function Connect-To {
'ExchangeHTTPS', 'ExchangeHTTPS',
'SCP' 'SCP'
)] )]
[string]$Type, [string] $Type,
[Parameter(Mandatory = $False, ParameterSetName = 'Shared')] [Parameter(Mandatory = $False, ParameterSetName = 'Shared')]
[Parameter(Mandatory = $False, ParameterSetName = 'Private')] [Parameter(Mandatory = $False, ParameterSetName = 'Private')]
[PSCredential]$Credentials, [PSCredential] $Credentials,
[Parameter(Mandatory = $true, ParameterSetNAme = 'Shared')] [Parameter(Mandatory = $true, ParameterSetNAme = 'Shared')]
[switch]$Shared, [switch] $Shared,
[Parameter(Mandatory = $False, ParameterSetName = 'Shared')] [Parameter(Mandatory = $False, ParameterSetName = 'Shared')]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
[string]$Path, [string] $Path,
[Parameter(Mandatory = $False, ParameterSetName = 'Private')] [Parameter(Mandatory = $False, ParameterSetName = 'Private')]
[Parameter(Mandatory = $False, ParameterSetName = 'Shared')] [Parameter(Mandatory = $False, ParameterSetName = 'Shared')]
[switch]$PassThru [switch] $PassThru
) )
begin { begin {