Skip to main content

Remove-LXC1Managers

This cmdlet disconnects a management hub from the organization.

Note
You cannot pipe objects to this cmdlet.

Syntax

Remove-LXC1Manager  -ManagerID String
[-Connection LXC1Connection]
[CommonParameter]
Parameters
-ManagerID String
Specifies the management hub ID.
-Connection LXC1Connection
Specifies the connection to the XClarity One server. If no connection is specified, the result from the last Connect-LXC1 cmdlet is used.
CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

Examples

The following example disconnects a hub from the organization.
param ( 
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword))
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$manager = Get-LXC1Managers -Name "hub_02"
$result = Remove-LXC1Manager -ManagerID $manager.Response.results[0].id

# Display the job ID.
$result