Fix global defaultSsoAdminServers variable
This commit is contained in:
@@ -40,7 +40,7 @@ FunctionsToExport = @('Connect-SsoAdminServer', 'Disconnect-SsoAdminServer', 'Ne
|
|||||||
CmdletsToExport = @()
|
CmdletsToExport = @()
|
||||||
|
|
||||||
# Variables to export from this module
|
# Variables to export from this module
|
||||||
VariablesToExport = '$global:DefaultSsoAdminServers'
|
VariablesToExport = ''
|
||||||
|
|
||||||
# Aliases to export from this module
|
# Aliases to export from this module
|
||||||
AliasesToExport = '*'
|
AliasesToExport = '*'
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ param(
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Global variables
|
# Global variables
|
||||||
$global:DefaultSsoAdminServers = New-Object System.Collections.ArrayList
|
$global:DefaultSsoAdminServers = New-Object System.Collections.Generic.List[VMware.vSphere.SsoAdminClient.DataTypes.SsoAdminServer]
|
||||||
|
|
||||||
# Module Advanced Functions Implementation
|
# Module Advanced Functions Implementation
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ function Disconnect-SsoAdminServer {
|
|||||||
|
|
||||||
Process {
|
Process {
|
||||||
if ($global:DefaultSsoAdminServers.Contains($Server)) {
|
if ($global:DefaultSsoAdminServers.Contains($Server)) {
|
||||||
$global:DefaultSsoAdminServers.Remove($Server)
|
$global:DefaultSsoAdminServers.Remove($Server) | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Server.IsConnected) {
|
if ($Server.IsConnected) {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user