Skip to main content

Import-LXCAUpdatePackage

This cmdlet imports one or more local firmware and management-server update packages to the firmware-updates repository.

Note
You cannot pipe objects to this cmdlet.

Syntax

Import-LXCAUpdatePackage [-Connection LXCAConnection]
-File String[]
[-ApplianceUpdate]
[-AsJob]
[-WaitForJob]
[CommonParameter]

Import-LXCAUpdatePackage [-Connection LXCAConnection]
-Folder String
[-FixId String[]
[-ApplianceUpdate]
[-AsJob]
[-WaitForJob]
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-File String[]
Specifies one or more file names of update packages to be imported.
-Folder String
Specifies the directory that contains the update packages to be imported. The packages must be in the specified folder; they cannot be in child folders.
-FixId String[]
Specifies one or more update fix IDs to be imported. If no fix ID is specified, all available update files are imported.
-ApplianceUpdate
When specified, the cmdlet uploads the update package to the management-server repository. If not specified, the cmdlet uploads the update package to the firmware-updates repository.
-AsJob
When specified, the cmdlet starts a background job in XClarity Administrator and returns a Job object immediately.
-WaitForJob
When specified with the -AsJob parameter, PowerShell waits for this background job in XClarity Administrator to either start or complete before running the next cmdlet in the script. This can be one of the following values.
  • ToStart. PowerShell waits until this background job starts in XClarity Administrator, so multiple jobs can run synchronously.

  • ToEnd. PowerShell waits until this background job completes in XClarity Administrator, so that one only job runs at a time.

If this parameter not specified, this cmdlet does not wait. The next cmdlet in the script runs regardless of whether this background job starts or completes.

If -AsJob is not specified, this parameter is ignored.

CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

This cmdlet adds the firmware-update packages to the appropriate repository. If you specify the -AsJob parameter, the cmdlet returns a Job object.

Examples

  • The following example imports the firmware-update packages to the XClarity Administrator server.

    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Port 443 -Credential $cred

    Import-LXCAUpdatePackage -File c:\Lenovo_fw_bmc_gfbt60a_windows_i386.exe,`
    c:\Lenovo_fw_bmc_gfbt60a_windows_i386.xml

    Disconnect-LXCA
  • The following example imports all firmware-update packages that are located in the c:\updates folder to the XClarity Administrator server as a job that runs in the background. A wait loop is enforced while the job is still in running state.

    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    $job = Import-LXCAUpdatePackage -Folder c:\updates -AsJob
    while ($job.State -eq "Running")
    {
    Start-Sleep -Seconds 5
    }

    Disconnect-LXCA
  • The following example imports all firmware-update packages that are located in the c:\updates folder to the XClarity Administrator server as a job that runs in the background. PowerShell waits until the import job completes before .ing fromXClarity Administrator.
    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    Import-LXCAUpdatePackage -Folder c:\updates -AsJob -WaitForJob ToEnd

    Disconnect-LXCA
  • The following example imports all management-server update packages that are located in the c:\updates folder the XClarity Administrator server as a job that runs in the background. PowerShell waits waits until the import-update job completes before disconnecting fromXClarity Administrator.
    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    Import-LXCAUpdatePackage -Folder c:\updates -AsJob -ApplianceUpdate -WaitForJob ToEnd

    Disconnect-LXCA
  • The following example imports the management-server update package that is located in the c:\updates folder to the XClarity Administrator server and then applies the updates. The import and installation both run as jobs in the background. PowerShell waits until the import-update job completes before applying the update, and then waits for the apply-update job to start before disconnecting fromXClarity Administrator.
    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    Import-LXCAUpdatePackage -ApplianceUpdate -Folder c:\updates -AsJob -WaitForJob ToEnd

    $fixID = "lnvgy_sw_lxca_thinksystemrepo3-2.4.0_anyos_noarch"
    Install-LXCAUpdateManagementServer -FixId $fixID -AsJob -WaitForJob ToEnd

    Disconnect-LXCA