Installing LXC1PSToolkit
To use the XClarity One PowerShell (LXC1PSToolkit) toolkit, install the toolkit, and start a Microsoft PowerShell session. The PowerShell toolkit is included with the XClarity One appliance and can be downloaded as described below.
- Microsoft .NET Framework 4.8 is installed. You can download Microsoft .NET Framework 4.8 from the Microsoft .NET Framework 4.8 webpage.
- The local system has network connectivity to the XClarity One portal.
- You must be logged in as a user with administrator authority to install and uninstall the PowerShell toolkit.
- The XClarity One PowerShell toolkit requires PowerShell 5.1 or the latest PowerShell Core 7.2 LTS (see the Installing PowerShell on Windows webpage.NotePowerShell Core is updated frequently by Microsoft. LXC1PSToolkit is aligned with the latest stable version of PowerShell that is available when the LXC1PSToolkit version is released.
Install the toolkit
Using PowerShell Get
Run the following command from a PowerShell session to download and install the toolkit. For more information, see the PowerShell Gallery – LXC1PSTool webpage.
Install-Module -Name LXC1PSToolkitUsing the install.ps1 file
Complete the following steps to download and install the toolkit.
- Download the toolkit by clicking the Download PowerShell Toolkit from the user-account drop-down menu in the upper-right corner.
- Unzip the package into a local directory.
- Install the LXC1PSToolkit by run the following command from a PowerShell console.
PS unzip_directory\install.ps1 installWhen the installation script is started, you are prompted to choose whether to install it 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 choose 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, usingSet-ExecutionPolicy cmdlet. You can choose RemoteSigned 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 *LXC1*A list of all of the XClarity One cmdlets is returned.PS C:\> get-Help *LXC1*
Name Category Module Synopsis
---- -------- ------ --------
Connect-LXC1 Cmdlet LXC1PSTool Connect...
Invoke-LXC1RestMethod Cmdlet LXC1PSTool Invoke...
Set-LXC1PSLogLevel Cmdlet LXC1PSTool Modify... - Use the Connect-LXC1 cmdlet to connect to your XClarity One portal, for example:
$user = "USERID"
$password = ConvertTo-SecureString "Passw0rd" -AsPlainText –Force
$cred = New-Object System.Management.Automation.PSCredential($user, $password)
Connect-LXC1 -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
Uninstall the toolkit
PS unzip_directory\install.ps1 remove
To install a later version, uninstall the PowerShell toolkit, and then install the later version.