Skip to main content

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.

You can run the LXC1PSToolkit on Microsoft Windows, Linux, and MacOS.

Before installing the LXC1PSToolkit, ensure that the local system meets the following prerequisites.
  • The XClarity One PowerShell toolkit requires PowerShell 5.1 on Windows or 7.4.16 and later on Windows, Linux and MacOS systems (see the Installing PowerShell on Windows webpage and GitHub – PowerShell webpage.
    Note
    PowerShell 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.
  • On Microsoft Windows, Microsoft .NET Framework 4.8 must be installed. You can download Microsoft .NET Framework 4.8 from the Microsoft .NET Framework 4.8 webpage.
  • The local system must have network connectivity to the XClarity One portal.

Existing LXC1PSToolkit installations are detected and removed before the new version is installed.

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 LXC1PSToolkit
  • Using the install.ps1 file

    Complete the following steps to download and install the toolkit.

    1. Download the toolkit by clicking the Download PowerShell Toolkit from the user-account drop-down menu in the upper-right corner of the XClarity One portal.
    2. Unzip the package into a local directory.
    3. Install the LXC1PSToolkit by running the following command in a PowerShell session from the unzip directory.
      PS .\install.ps1 -Action install [-InstallScope String] [-CustomLocation String]

      Where:

      –InstallScope String

      (Optional) Specifies the installation scope when -–CustomLocation is not provided. This can be one of the following values.

      • local: (default) Install for the current user
      • global: Install for all users (Windows only; requires administrator rights)
      –CustomLocation String
      (Optional) Specifies the base directory where you want to install the module. By default, the module is installed in one of these base directories.
      • Windows PowerShell 5.1 for single user: c:\users\gdkhgk\Documents\WindowsPowerShell\Modules
      • Windows PowerShell 5.1 for global user: c:\Program Files\WindowsPowerShell\Modules
      • Windows PowerShell 7.x for single user: c:\users\gdkhgk\Documents\PowerShell\Modules
      • Windows PowerShell 7.x for global user: c:\Program Files\PowerShell\Modules
      • Non-Windows: $HOME/.local/share/powershell/Modules
    4. 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...
    5. Use the Connect-LXC1 cmdlet to connect to your XClarity One portal.

Uninstall the toolkit

To uninstall the PowerShell toolkit, run the following command as administrator in a PowerShell session.
PS .\install.ps1 -Action remove [-CustomLocation String] [-Force]
Where:
–CustomLocation String
(Optional) Specifies the base directory where the module is installed.
–Force
Skips interactive confirmation prompts when removing existing installations.