This cmdlet retrieves all installed licenses or export a specified list of the installed licenses to the local system.

Note: You cannot pipe objects to this cmdlet.


Add-LXCAQuantityLicense [-Connection LXCAConnection] 

Add-LXCAQuantityLicense [-Connection LXCAConnection] 
                         -LicenseIds String[]
                        [-Destination String]


-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.
-Destination String
Specifies the directory and file name where the file is to be saved on the local system.
  • If you specify a directory but not a file name (in other words, if the string ends with a back slash \), the file name that is returned by the XClarity Administrator is used.

    If the directory does not exist, it is automatically created.

  • If you specify a string that does not end with a backslash \, the name after the last backslash \ is used as the file name.

    Note: The cmdlet might modify the file extension to reflect the actual file type. The type depends on how many installed licenses can be exported.
    • If only one license can be exported, the exported file is the license key, and the file extension is key.

    • If multiple licenses can be exported, the exported file is an archive license keys, and the file extension is zip.

-LicenseIds String[]
Specifies a list of IDs of licenses to be exported, separated by a comma.
Note: The list is filtered to match the IDs of the installed licenses. Therefore:
  • Only founded licenses are exported.

  • If no license is found, the ERROR: Licenses with IDs <licenses_ids> are not installed on LXCA message is displayed.

When specified, if the file already exists in the specified directory, the file is overwritten. The default value for Overwrite is false.

If not specified, and the file already exists in the specified directory, the file is not overwritten, and the System.IO.IOException: The _full_file_path_ file already exists exception is thrown.

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.


For XClarity Administrator v2.7.0 and earlier, the NotSupportedException exception is thrown


Related links