vSphere PowerCLI Reference

Add-EsxSoftwarePackage

Synopsis

Syntax

Add-EsxSoftwarePackage [-ImageProfile] <ImageProfile> [-SoftwarePackage] <SoftwarePackage[]> [-Force] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Adds new VIBs to an image profile or updates existing VIBs in an image profile. For each package, if it is newer or older than an existing package in the profile, the existing package will be replaced. Image Builder performs all image profile validation tests on the modified image profile.


The output of this cmdlet may be piped into any other cmdlet taking image profiles as input.


Note that the image profile object that is passed in will have its VibList modified. Please see the New-EsxImageProfile cmdlet for details about persistence of image profiles.


Modification is not possible if the ReadOnly property of an ImageProfile is true.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ImageProfileImageProfile(pipeline input, prompt) Image profile to edit.

Takes one of the following forms:

*Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object

*ImageProfile object
truetrue (ByValue, ByPropertyName)
SoftwarePackageSoftwarePackage[](pipeline input, prompt) List of software packages to add to the profile.

Takes one of the following forms:

*Name of a VIB, as displayed in the Name column of Get-EsxSoftwarePackage, or the Name property of any SoftwarePackage object. Image Builder selects the highest available version of the named package.

*"<Name> <Version>", for specifying a specific version of a VIB.

*SoftwarePackage object

*GUID of the VIB (from the Guid property of a SoftwarePackage object)

*A list containing a mix of any of the above

If more than one vendor provides a package with the same name, then a non-terminating error results and the cmdlet skips that package.
truetrue (ByValue, ByPropertyName)
ConfirmSwitchParameterfalsefalse
ForceSwitchParameterInstalls packages that break extensibility rules such as standard file path. Also bypasses dependency checks on packages. Use this option with care. Because it bypasses standard validation checks, an invalid image profile might result.falsefalse
WarningActionActionPreferencefalsefalse
WarningVariableStringfalsefalse
WhatIfSwitchParameterfalsefalse

Return Type

Notes

Examples

---------- Example 1 ----------

Add-EsxSoftwarePackage -ImageProfile "My custom profile" -SoftwarePackage net-bnx2

Add a package by name to an image profile:

---------- Example 2 ----------

Add-EsxSoftwarePackage -ImageProfile "My custom profile" -SoftwarePackage "net-bnx2 1.6.7-0.1OEM1"

Add a package of a specific name and version:

---------- Example 3 ----------

New-EsxImageProfile -CloneProfile "ESX-5.0-234567-standard" -Name "My custom profile" | \ Add-EsxSoftwarePackage net-bnx2

Clone an image profile, then add a package by name, in one line using pipelining:


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.