Refine the implementation

This commit is contained in:
pinguinfuss 2023-05-22 21:37:39 +02:00
parent e3349cc4dd
commit 471a372bf9
2 changed files with 32 additions and 19 deletions

View File

@ -22,6 +22,7 @@ function Connect-To {
- ExchangeHTTPS - ExchangeHTTPS
- FTP - FTP
- NetAppFAS - NetAppFAS
- NetAppStorageGRID
- SCP - SCP
- VMware - VMware
- VMwareCisServer - VMwareCisServer
@ -48,28 +49,32 @@ function Connect-To {
[None] [None]
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'ucs.myside.local' -Type CiscoUcs Connect-To -RemoteHost 'vc.domain.local' -Type CisServer
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'ucscentral.myside.local' -Type 'CiscoUcsCentral' Connect-To -RemoteHost 'ucs.domain.local' -Type CiscoUcs
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'ftp.myside.local' -Type FTP Connect-To -RemoteHost 'ucs-central.domain.local' -Type 'CiscoUcsCentral'
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'fas.myside.local' -Type NetAppFAS Connect-To -RemoteHost 'exchange01.domain.local' -Type ExchangeHTTP
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'esx01.myside.local' -Type VMware Connect-To -RemoteHost 'exchange01.domain.local' -Type ExchangeHTTPS
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'vCenter.myside.local' -Type CisServer Connect-To -RemoteHost 'ftp.domain.local' -Type FTP
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'exchange01.myside.local' -Type ExchangeHTTP Connect-To -RemoteHost 'fas.domain.local' -Type NetAppFAS
.EXAMPLE .EXAMPLE
Connect-To -RemoteHost 'exchange01.myside.local' -Type ExchangeHTTPS Connect-To -RemoteHost 'grid.domain.local' -Type NetAppStorageGRID
.EXAMPLE
Connect-To -RemoteHost 'esx01.domain.local' -Type VMware
#> #>
[CmdletBinding(DefaultParameterSetName = 'Private')] [CmdletBinding(DefaultParameterSetName = 'Private')]
@ -98,6 +103,7 @@ function Connect-To {
'ExchangeHTTPS', 'ExchangeHTTPS',
'FTP', 'FTP',
'NetAppFAS', 'NetAppFAS',
'NetAppStorageGRID',
'SCP', 'SCP',
'VMware', 'VMware',
'VMwareCisServer' 'VMwareCisServer'
@ -297,7 +303,7 @@ function Connect-To {
} }
} }
'NetAppSGWS' { 'NetAppStorageGRID' {
# Construct the splatting for Connect-SgwServer # Construct the splatting for Connect-SgwServer
$params = @{ $params = @{
Name = $RemoteHost Name = $RemoteHost

View File

@ -17,7 +17,7 @@ function Disconnect-From {
- ExchangeHTTPS - ExchangeHTTPS
- FTP - FTP
- NetAppFAS - NetAppFAS
- NetAppSGWS - NetAppStorageGRID
- SCP - SCP
- VMware - VMware
- VMwareCisServer - VMwareCisServer
@ -32,28 +32,35 @@ function Disconnect-From {
[None] [None]
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'ucs.myside.local' -Type CiscoUcs Disconnect-From -RemoteHost 'vc.domain.local' -Type CisServer
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'ftp.myside.local' -Type FTP Disconnect-From -RemoteHost 'ucs.domain.local' -Type CiscoUcs
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'fas.myside.local' -Type NetAppFAS Disconnect-From -RemoteHost 'ucs-central.domain.local' -Type 'CiscoUcsCentral'
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'esx01.myside.local' -Type VMware Disconnect-From -RemoteHost 'exchange01.domain.local' -Type ExchangeHTTP
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'esx01.myside.local' -Type VMware -Force:$True Disconnect-From -RemoteHost 'exchange01.domain.local' -Type ExchangeHTTPS
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'vcenter.myside.local' -Type CisServer Disconnect-From -RemoteHost 'ftp.domain.local' -Type FTP
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'exchange01.myside.local' -Type ExchangeHTTP Disconnect-From -RemoteHost 'fas.domain.local' -Type NetAppFAS
.EXAMPLE .EXAMPLE
Disconnect-From -RemoteHost 'exchange01.myside.local' -Type ExchangeHTTPS Disconnect-From -RemoteHost 'grid.domain.local' -Type NetAppStorageGRID
.EXAMPLE
Disconnect-From -RemoteHost 'esx01.domain.local' -Type VMware
.EXAMPLE
Disconnect-From -RemoteHost 'esx01.domain.local' -Type VMware -Force:$True
#> #>
[CmdletBinding()] [CmdletBinding()]
@ -76,7 +83,7 @@ function Disconnect-From {
'ExchangeHTTPS', 'ExchangeHTTPS',
'FTP', 'FTP',
'NetAppFAS', 'NetAppFAS',
'NetAppSGWS', 'NetAppStorageGRID',
'SCP', 'SCP',
'VMware', 'VMware',
'VMwareCisServer' 'VMwareCisServer'