From 2399f227c90ba5aea9403d837e5be5a64a9e674b Mon Sep 17 00:00:00 2001 From: pinguinfuss Date: Thu, 9 Mar 2023 20:34:05 +0100 Subject: [PATCH] Implement NetAppSGWS --- src/Connection/Disconnect-From.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Connection/Disconnect-From.ps1 b/src/Connection/Disconnect-From.ps1 index 0550534..9545268 100644 --- a/src/Connection/Disconnect-From.ps1 +++ b/src/Connection/Disconnect-From.ps1 @@ -17,6 +17,7 @@ function Disconnect-From { - ExchangeHTTPS - FTP - NetAppFAS + - NetAppSGWS - SCP - VMware - VMwareCisServer @@ -75,6 +76,7 @@ function Disconnect-From { 'ExchangeHTTPS', 'FTP', 'NetAppFAS', + 'NetAppSGWS', 'SCP', 'VMware', 'VMwareCisServer' @@ -150,6 +152,18 @@ function Disconnect-From { } } + 'NetAppSGWS' { + try { + $null = Disconnect-SgwServer -Server $RemoteHost + $null = Remove-Variable -Name CurrentSgwServer -Scope Global -ErrorAction 'SilentlyContinue' + } + + catch { + # Write a error message to the log. + Write-Error -Message ('Unable to disconnect from {0} using Type {1}.' -f $RemoteHost, $Type) + } + } + 'SCP' { if ($global:WinSCPSession.Opened) { Remove-WinSCPSession -WinSCPSession $global:WinSCPSession