Installing the Lenovo XClarity Administrator PowerShell toolkit
To use the Lenovo XClarity Administrator PowerShell (LXCAPSTool) toolkit, install the toolkit, and start a Microsoft PowerShell session. The PowerShell toolkit is included with the XClarity Administrator appliance and can be downloaded as described below.
Before you begin
- Microsoft .NET Framework 4.5 is installed. You can download Microsoft .NET Framework 4.5 from the Microsoft .NET Framework 4.5 webpage.
- Transport Layer Security (TLS) v1.2 or v1.3 is enabled on the system. For more information, see Enable Transport Layer Security (TLS) 1.2 overview - Configuration Manager | Microsoft Docs webpage
- The local system has network connectivity to the XClarity Administrator management server.
You must be logged in as a user with administrator authority to install and uninstall the PowerShell toolkit
- The XClarity Administrator PowerShell toolkit supports the following PowerShell versions (see the Installing PowerShell on Windows webpage.
XClarity Administrator v3.1 and later requires PowerShell 4, 5.1 or PowerShell Core 7.0.3 or later.
XClarity Administrator v3.0 requires PowerShell 3, 4, 5.1 or PowerShell Core 7.0.1 or later.
NotePowerShell Core 7.0 is updated frequently by Microsoft. TheXClarity Administrator PowerShell toolkit is aligned with the latest stable version of PowerShell that is available when the XClarity Administrator PowerShell toolkit version is released.
Procedure
Using PowerShell Get
Run the following command from a PowerShell session to download and install the toolkit. For more information, see the PowerShell Gallery – LXCAPSTool webpage.Install-Module -Name LXCAPSTool
Using the install.ps1 file:
Complete the following steps to download and install the toolkit.
Download the toolkit by clicking the user-actions menu () on the XClarity Administrator title bar, clicking Resources, and then clicking PowerShell toolkit Download from the dialog.
Unzip the package into a local directory.
Install the LXCAPSTool by run the following command from a PowerShell console.
PS unzip_directory\install.ps1 install
When the installation script is started, you are prompted to choose whether to install for the current user or for all users.
Choose the user that you want to use to install the toolkit. Enter C for the current user or A for all users.
If you chose to install the module for all users, start the PowerShell console as administrator.
NoteDepending on how your system is configured, you might need to adjust your PowerShell’s execution policy rule, using Set-ExecutionPolicy cmdlet. You can chooseRemoteSigned value to ensure that the downloaded module is signed by Lenovo. For more information, see the Microsoft - Set-ExecutionPolicy webpage Start a PowerShell session.
Validate that the module was imported by running the following cmdlet.
Get-Help *LXCA*
A list of all of the XClarity Administrator cmdlets is returned.PS C:\> get-Help *LXCA*
Name Category Module Synopsis
---- -------- ------ --------
Get-LXCALicenseCompliance Cmdlet LXCAPSTool Get-LXC...
Get-LXCALicensableDeviceCount Cmdlet LXCAPSTool Get-LXC...
Get-LXCALicenseWarningPeriod Cmdlet LXCAPSTool Get-LXC...
Get-LXCAManagementServerPackage Cmdlet LXCAPSTool Get-LXC...
Get-LXCAQuantityLicense Cmdlet LXCAPSTool Get-LXC...
Install-LXCAQuantityLicense Cmdlet LXCAPSTool Install...
Install-LXCAUpdateManagementServer Cmdlet LXCAPSTool Install...
Remove-LXCAQuantityLicense Cmdlet LXCAPSTool Remove-...
Set-LXCALicenseWarningPeriod Cmdlet LXCAPSTool Set-LXC...Use the Connect-LXCA cmdlets to connect to your XClarity Administrator server, for example:
$user = "USERID"
$password = ConvertTo-SecureString "Passw0rd" -AsPlainText –Force
$cred = New-Object System.Management.Automation.PSCredential($user, $password)
Connect-LXCA 192.0.2.0 -Credential $cred -SkipCertificateCheck
After you finish
You can get help for any PowerShell cmdlets using the Get-Help cmdlet.
Get-Help *LXCA*. Lists all PowerShell cmdlets
Get-Help <cmdlet_name>. Shows brief help for the specified cmdlet
Get-Help <cmdlets_name> -full. Shows detailed help for the specified cmdlet
To uninstall the PowerShell toolkit, run the following command as administrator:
unzip_directory\RemoveLXCAPSTool.bat
To install a later version, uninstall the PowerShell toolkit, and then install the later version.