From 56727afa3e40032e9fda1ddca8cc30b8e8bc3770 Mon Sep 17 00:00:00 2001 From: pinguinfuss Date: Thu, 9 Mar 2023 13:09:15 +0100 Subject: [PATCH] prettify the parameters --- src/Connection/Connect-To.ps1 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Connection/Connect-To.ps1 b/src/Connection/Connect-To.ps1 index 6ce3e3e..c1109d2 100644 --- a/src/Connection/Connect-To.ps1 +++ b/src/Connection/Connect-To.ps1 @@ -73,19 +73,21 @@ function Connect-To { #> [CmdletBinding(DefaultParameterSetName = 'Private')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidGlobalVars', '', Justification = 'Wrapping existing var from WinSCP module.' )] + param ( [Parameter(Mandatory = $true, ParameterSetName = 'Shared')] [Parameter(Mandatory = $true, ParameterSetName = 'Private')] - [string]$RemoteHost, + [string] $RemoteHost, [Parameter(Mandatory = $false, ParameterSetName = 'Shared')] [Parameter(Mandatory = $false, ParameterSetName = 'Private')] - [string]$Identifier, + [string] $Identifier, [Parameter(Mandatory = $true, ParameterSetName = 'Shared')] [Parameter(Mandatory = $true, ParameterSetName = 'Private')] @@ -100,22 +102,22 @@ function Connect-To { 'ExchangeHTTPS', 'SCP' )] - [string]$Type, + [string] $Type, [Parameter(Mandatory = $False, ParameterSetName = 'Shared')] [Parameter(Mandatory = $False, ParameterSetName = 'Private')] - [PSCredential]$Credentials, + [PSCredential] $Credentials, [Parameter(Mandatory = $true, ParameterSetNAme = 'Shared')] - [switch]$Shared, + [switch] $Shared, [Parameter(Mandatory = $False, ParameterSetName = 'Shared')] [ValidateNotNullOrEmpty()] - [string]$Path, + [string] $Path, [Parameter(Mandatory = $False, ParameterSetName = 'Private')] [Parameter(Mandatory = $False, ParameterSetName = 'Shared')] - [switch]$PassThru + [switch] $PassThru ) begin {