[TESTING] Coverage Report skipping for PRs #15
@ -22,6 +22,8 @@ function Disconnect-From {
|
|||||||
- CisServer Terminates the connection from a Vmware CisServer.
|
- CisServer Terminates the connection from a Vmware CisServer.
|
||||||
- ExchangeHTTP Remove the existing remote session to the given Exchange server
|
- ExchangeHTTP Remove the existing remote session to the given Exchange server
|
||||||
- ExchangeHTTPS Remove the existing remote session to the given Exchange server
|
- ExchangeHTTPS Remove the existing remote session to the given Exchange server
|
||||||
|
- SCP Terminates the existing SCP session.
|
||||||
|
|
||||||
.PARAMETER Force
|
.PARAMETER Force
|
||||||
Force the disconnect, even if the disconnect would fail.
|
Force the disconnect, even if the disconnect would fail.
|
||||||
|
|
||||||
@ -70,7 +72,16 @@ function Disconnect-From {
|
|||||||
[string]$RemoteHost,
|
[string]$RemoteHost,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[ValidateSet('CiscoUcs', 'FTP', 'NetAppFAS', 'VMware', 'CisServer', 'ExchangeHTTP', 'ExchangeHTTPS')]
|
[ValidateSet(
|
||||||
|
'CiscoUcs',
|
||||||
|
'FTP',
|
||||||
|
'NetAppFAS',
|
||||||
|
'VMware',
|
||||||
|
'CisServer',
|
||||||
|
'ExchangeHTTP',
|
||||||
|
'ExchangeHTTPS',
|
||||||
|
'SCP'
|
||||||
|
)]
|
||||||
[string]$Type,
|
[string]$Type,
|
||||||
|
|
||||||
[Parameter(Mandatory = $false)]
|
[Parameter(Mandatory = $false)]
|
||||||
@ -178,6 +189,18 @@ function Disconnect-From {
|
|||||||
Write-Error @MessageParams
|
Write-Error @MessageParams
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"SCP" {
|
||||||
|
if ($Global:WinSCPSession.Opened) {
|
||||||
|
Remove-WinSCPSession -WinSCPSession $Global:WinSCPSession
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$MessageParams = @{
|
||||||
|
Message = "There is no open WinSCP Session"
|
||||||
|
ErrorAction = "Stop"
|
||||||
|
}
|
||||||
|
Write-Error @MessageParams
|
||||||
|
}
|
||||||
|
}
|
||||||
default {
|
default {
|
||||||
# Write a error message to the log.
|
# Write a error message to the log.
|
||||||
$MessageParams = @{
|
$MessageParams = @{
|
||||||
|
Loading…
Reference in New Issue
Block a user