Add-LXC1Manager
This cmdlet adds a management hub to the organization.
Note
You cannot pipe objects to this cmdlet.
Syntax
Add-LXC1Manager -HubName String
-HubCountryCode String
-HubAddress String
-HubCredential PSCredential
-HubCertificateFile String
-HubSkipCertificateCheck
-WhatIf
-Confirm
[-HubPort Int32]
[-Connection LXC1Connection]
[CommonParameter]
Parameters
- –HubName String
- Specifies the management hub name.
- –HubCountryCode String
- Specifies the country code where the hub is located.
- –HubAddress String
- Specifies the P address or the FQDN for the hub.
- –HubCredential PSCredential
- Specifies a credential object that includes the credentials for signing in to the hub.
- –HubPort Int32
- Specifies the port to be used to connect to the hub. The default value is B.
- –HubCertificateFile String
- Specifies the full path of a PEM-encoded file that contains the hub certificate chain (hub's certificate, intermediate certificates (if available), and root CA chain certificates).
When specified, this cmdlet reads the file, parses all certificates it contains, and uses them to validate the hub's TLS certificate instead of relying solely on the system certificate store.
If the root CA certificate found in the file is not present in the system trust store, this cmdlet displays a browser-style trust warning and prompts you to confirm whether you trust the certificate before proceeding.
NoteYou cannot use the-HubSkipCertificateCheck and -HubCertificateFile parameters in the same command. - –HubSkipCertificateCheck
- Skips the hub's certificate validation checks, including expiration, revocation, and trusted root authority. Otherwise, the connection is made only if the hub contains a valid certificate that is signed by a trusted certification authority.NoteYou cannot use the
-HubSkipCertificateCheck and -HubCertificateFile parameters in the same command. WarningBe aware that using this parameteris not recommended. It is intended to be used only against known hosts using a self-signed certificate for testing purposes only. - –WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not executed.
- –Confirm
- Prompts you for confirmation before running the cmdlet.
- -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
System.String
This cmdlet returns an informational message if the request is successfully completed.
Lenovo.XC1.PowerShell.Automation.Data.RequestStatusMessage
If the request fails, this cmdlet returns an RequestStatusMessage object that contains the failure details.
Examples
The following example adds a hub to 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
$result = Add-LXC1Manager -HubName "hub " `
-HubCountryCode SK `
-HubCredential $(Get-Credential) `
-HubAddress 192.0.2.203
$result
Give documentation feedback