Skip to main content

Lenovo XClarity Administrator PowerShell toolkit examples

Several sample scripts are available to help you to begin using the Lenovo XClarity Administrator PowerShell toolkit to manage devices.

The sample scripts are location in the following directory:
unzip_directory\Sample
The following scripts are included in the Sample directory:
  • End_to_End.ps1

    Demonstrates how to set up a single script to manage rack servers, update firmware, deploy Configuration Patterns, and deploy operating systems to those rack servers.

  • BulkImport_And_Configuration.ps1

    Demonstrates how to use the Add-LXCAManagedDevice -BulkImportFile cmdlet to manage multiple systems using bulk import and then use the Install-LXCAConfigPattern cmdlet configure managed systems using Configuration Patterns

  • Manage_Systems.ps1

    Demonstrates how to use the Add-LXCAManagedDevice cmdlet to manage multiple devices and then use the Invoke-LXCASystemAction cmdlet to restart the managed devices.

  • View_Systems.ps1

    Demonstrates how to use the Get-LXCAChassis, Get-LXCAComputeNode, and Get-LXCARackServer cmdlets to view the managed devices.

  • View_Events.ps1

    Demonstrates how to use the Get-LXCAEvent cmdlet to view the management server and hardware events.

  • Monitor_Events.ps1

    Demonstrates how to use the Start-LXCAEventMonitor cmdlet to monitor the critical, fatal and warning events and to send an email when a new event occurs.

  • Config_Systems.ps1

    Demonstrates how to use the Install-LXCAConfigPattern cmdlet to deploy Configuration Patterns to target devices.

  • Firmware_Update.ps1

    Demonstrates how to use the Install-LXCAUpdatePackage cmdlet to install firmware updates on selected systems based on compliance policies.

    Management_Server_Update_Update.ps1

    Demonstrates how to use theImport-LXCAUpdatePackage and Invoke-LXCARestMethod cmdlets to install management-server updates.

  • OSDeployment\OS_Deployment.ps1

    Demonstrates how to use the New-LXCADeployTask and Install-LXCAOSImage cmdlets to install operating systems on managed servers.

  • OSDeployment\OS_Deployment_custoImage.ps1

    Demonstrates how to use the New-LXCADeployTask and Install-LXCAOSImage cmdlets to deploy a custom operating-system image to a managed server.

  • OSDeployment\OS_Deployment_MultipleTargets_MultipleJobs.ps1

    Demonstrates how to use the New-LXCADeployTask and Install-LXCAOSImage cmdlets to deploy an operating-system image to multiple managed servers using multiple jobs.

  • OSDeployment\OS_Deployment_MultipleTargets_SingleJob.ps1

    Demonstrates how to use the New-LXCADeployTask and Install-LXCAOSImage cmdlets to deploy an operating-system image to multiple managed servers using a single job.

Other sample scripts are includes as well.