You can use Image Builder cmdlets to check which depots are available, to add a depot, to display image profile information, and to create a new image profile by cloning one of the available image profiles.

Before you use the cmdlets in this workflow, make sure your environment meets the following requirements.

VMware PowerCLI and prerequisite is software installed. See Install Image Builder PowerCLI and Prerequisite Software.

If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See Using Image Builder Cmdlets.

Published profiles are usually read only and cannot be modified. Even if a published profile is not read only, cloning instead of modifying the profile is a best practice, because modifying the original profile erases the original. You cannot revert to the original, unmodified profile except by reconnecting to a depot.

A profile cloning workflow might include checking the current state of the system, adding a software depot, and cloning the profile.

1

In a PowerShell window, check whether any software depots are defined for the current session.

$DefaultSoftwareDepots

PowerShell returns the currently defined depots, or nothing if you just started PowerShell.

2

If necessary, add the depot that includes the profile you want to clone to the current session.

For remote depots, run Add-EsxSoftwareDepot -DepotUrl depot_url.

For an offline depot ZIP file, you must download the ZIP file first.

a

Download the ZIP file to a local file path.

b

Run Add-EsxSoftwareDepot -DepotUrl C:\file_path\offline-bundle.zip

PowerShell adds the specified depot to your current session and lists all current depots.

3

Check the $DefaultSoftwareDepots variable, which now returns the newly-added depot.

$DefaultSoftwareDepots

4

Display all currently available image profiles.

Get-EsxImageProfile


Name								                  Vendor      Last Modified     Acceptance Level
----                          ------      -------------     -------------
ESX-meta-5.0.zip Profile #1   vendor1     6/13/2010 12:...  PartnerSupported
ESX-meta-5.0.zip Profile #2   vendor2     6/13/2010 12:...  PartnerSupported
base-tbd-v1                   vendor1     6/13/2010 12:...  CommunitySupported
ESX-meta-5.1.zip Profile #1   vendor1     6/13/2010 12:...  PartnerSupported
.....
         

The list helps you pick a likely candidate for cloning.

5

Clone one of the image profiles by specifying the name displayed in the Name column and a name for the new profile.

$ip = New-EsxImageProfile -CloneProfile base-tbd-v1 -Name "Test Profile 42"

6

Display the newly created image profile.

Get-EsxImageProfile


Name                Vendor          Last Modified          Acceptance Level
----                ------          -------------          ----------------
Test Profile 42     user1           9/15/2010 5:45:43...   PartnerSupported

This sample cmdlet sequence repeats the steps of this workflow, but passes parameters as objects, accessed by position in a variable, instead of passing parameters by name. You can run the following cmdlets in sequence from the PowerCLI prompt.

$DefaultSoftwareDepots
Add-EsxSoftwareDepot -DepotUrl depot_url
$DefaultSoftwareDepots
$profs = Get-EsxImageProfile
$profs
$ip = New-EsxImageProfile -CloneProfile $profs[2] -Name "new_profile_name"
$ip