Add a bit of spacing. Remove default as there is nothing to do.

This commit is contained in:
pinguinfuss 2023-03-09 20:33:27 +01:00
parent c125ad0acd
commit 1747bb24a8
1 changed files with 10 additions and 4 deletions

View File

@ -199,6 +199,7 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
'CiscoUcsCentral' {
try {
$handle = Connect-UcsCentral -Name $RemoteHost -Credential $creds -NotDefault
@ -209,6 +210,7 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using {1}' -f $RemoteHost, $Type)
}
}
'ExchangeHTTP' {
try {
$ConnectionParams = @{
@ -225,6 +227,7 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
'ExchangeHTTPS' {
try {
$ConnectionParams = @{
@ -239,6 +242,7 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
'FTP' {
# First establish the FTP session
$WinSCPConParams = @{
@ -247,6 +251,7 @@ function Connect-To {
Protocol = 'Ftp'
FtpMode = 'Passive'
}
try {
$FTPSessionOption = New-WinSCPSessionOption @WinSCPConParams
$global:WinSCPSession = New-WinSCPSession -SessionOption $FTPSessionOption
@ -263,6 +268,7 @@ function Connect-To {
Write-Error -Message $m
}
}
'NetAppFAS' {
# Construct the splatting for Connect-NcController
$params = @{
@ -290,6 +296,7 @@ function Connect-To {
return $handle
}
}
'NetAppSGWS' {
# Construct the splatting for Connect-SgwServer
$params = @{
@ -317,6 +324,7 @@ function Connect-To {
return $SgwSession
}
}
'SCP' {
$WinSCPSessionParams = @{
Credential = $creds
@ -343,6 +351,7 @@ function Connect-To {
Write-Error -Message $m
}
}
'VMware' {
try {
Connect-VIServer -Server $RemoteHost -Credential $creds -ErrorAction Stop | Out-Null
@ -353,6 +362,7 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
'VMwareCisServer' {
try {
if ($PassThru.IsPresent) {
@ -368,10 +378,6 @@ function Connect-To {
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
default {
# Write a error message to the log.
Write-Error -Message ('Unable to connect to {0} using Type {1}.' -f $RemoteHost, $Type)
}
}
}
}