19 lines
599 B
PowerShell
19 lines
599 B
PowerShell
|
function Clear-AlkamiServiceFabricClusterConnection {
|
|||
|
<#
|
|||
|
.SYNOPSIS
|
|||
|
Disconnects the current session from a Service Fabric cluster if connected.
|
|||
|
This is mostly useful if you need to switch between client/admin credentials on the same cluster.
|
|||
|
#>
|
|||
|
[CmdletBinding()]
|
|||
|
Param()
|
|||
|
|
|||
|
$loglead = (Get-LogLeadName);
|
|||
|
|
|||
|
if($null -eq $Global:ClusterConnection) {
|
|||
|
Write-Host "$loglead Not connected to a Service Fabric cluster.";
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
Write-Host "$loglead Clearing Service Fabric cluster connection.";
|
|||
|
$Global:ClusterConnection = $null;
|
|||
|
}
|