Skip to main content

Remove-LXCAQuantityLicense

This cmdlet removes a specific license activation key from the Lenovo XClarity Administrator server.

Note
You cannot pipe objects to this cmdlet.

Syntax

Remove-LXCAQuantityLicense [-Connection LXCAConnection] 
-LicenseId int
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-LicenseId int
Specifies the ID of the license activation key to be removed.
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

This cmdlet returns a Lenovo.SysMgmt.LXCA.Integration.Data.RequestResult object, that contains information about the operation result on the XClarity Administrator server.

Examples

  • The following example removes the license with id 3 from the XClarity Administrator server.

    $cred = Get-Credential
    Connect-LXCA -Host 1.111.11.11 -Credential $cred

    $result = Remove-LXCAQuantityLicense -LicenseId 3

    # show all information about the request:
    $result

    Disconnect-LXC
  • The following example removes all installed licenses from the XClarity Administrator server.

    $cred = Get-Credential
    Connect-LXCA -Host 1.111.11.11 -Credential $cred

    $license = Get-LXCAQuantityLicense

    foreach($item in $license.Licenses)
    {
    $(Remove-LXCAQuantityLicense -LicenseId $item.Id)
    }

    Disconnect-LXCA