Skip to main content

Installing the PowerShell toolkit

To use the Lenovo XClarity Orchestrator PowerShell (LXCOPSTool) toolkit, install the toolkit, and start a Microsoft PowerShell session. The PowerShell toolkit is included with the XClarity Orchestrator appliance and can be downloaded as described below.

Before you begin

Before installing the XClarity Orchestrator PowerShell toolkit, ensure that the local Microsoft Windows system meets the following prerequisites:
  • 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 Orchestrator management server.
  • You must be logged in as a user with administrator authority to install and uninstall the PowerShell toolkit.
  • The XClarity Orchestrator PowerShell toolkit requires PowerShell 5.1 or the latest PowerShell Core 7.2 LTS (see the Installing PowerShell on Windows webpage.
    Note
    PowerShell Core is updated frequently by Microsoft. The XClarity Orchestrator PowerShell toolkit is aligned with the latest stable version of PowerShell that is available when the XClarity Orchestrator 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 – LXCOPSTool webpage.

    Install-Module -Name LXCOPSTool
  • Using the InstallLXCOPSTool.bat file

    Complete the following steps to download and install the toolkit.

    1. Download the toolkit by clicking the User-Account menu (User Account menu) on the XClarity Orchestrator title bar, clicking Toolkit, and then clicking Download PowerShell Toolkit from the dialog.
    2. Unzip the package into a local directory.
    3. Run the installation .BAT file as administrator to install the tool.
      unzip_directory\InstallLXCOPSTool.bat

      When the installation script is started, you are prompted to choose whether to install for the current user or for all users.

    4. Choose the user that you want to use to install the toolkit. Enter C for the current user or A for all users.
    5. Start a PowerShell session.
    6. Run the following cmdlet to import the toolkit.
      Import-Module LXCOPSTool

    7. Validate that the module was imported by running the following cmdlet.
      Get-Help *LXCO*
      A list of all of the XClarity Orchestrator cmdlets is returned.
      PS C:\> get-Help *LXCO*

      Name Category Module Synopsis
      ---- -------- ------ --------
      Add-LXCOPSLogHeader Cmdlet LXCOPSTool Add-LXC...
      Connect-LXCO Cmdlet LXCOPSTool Connect...
      Disconnect-LXCO Cmdlet LXCOPSTool Disconn...
      Set-LXCOPSLogLevel Cmdlet LXCOPSTool Set-LXC...

    8. Use the Connect-LXCO cmdlet to connect to your XClarity Orchestrator server, for example:
      $user = "USERID"
      $password = ConvertTo-SecureString "Passw0rd" -AsPlainText –Force
      $cred = New-Object System.Management.Automation.PSCredential($user, $password)
      Connect-LXCO -HostUri 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 *LXCO*. 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\RemoveLXCOPSTool.bat
  • To install a later version, uninstall the PowerShell toolkit, and then install the later version.