6.7

Table Of Contents
Example: Depot Content Examination Using Variables
This workflow example examines depot contents by passing in parameters as objects accessed by
position in a variable, instead of passing in parameters by name. You can run the following commands in
sequence from the PowerCLI prompt. Replace names with names that are appropriate in your installation.
Get-EsxSoftwarePackage -Vendor "V*"
Get-EsxSoftwarePackage -Vendor "V*" -Name "r*"
Get-EsxSoftwarePackage -Version "2.0*"
$ip1 = Get-EsxImageProfile -name ESX-5.0.0-123456-full
$ip1.VibList
Get-EsxSoftwarePackage -CreatedAfter 7/1/2010
Create Image Profiles by Cloning Workflow
You can use vSphere ESXi Image Builder cmdlets to check which depots are available, to add a depot, to
view image profile information, and to create a new image profile by cloning one of the available image
profiles.
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.
Prerequisites
Verify that PowerCLI and prerequisite software is installed. See Install vSphere ESXi Image Builder and
Prerequisite Software.
Procedure
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 the depot containing the profile that you want to clone does not appear in the results, add it to the
current session.
Option Action
Remote depot Run Add-EsxSoftwareDepot -DepotUrl depot_url.
ZIP file 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 (Optional) Check the $DefaultSoftwareDepots variable, which now returns the newly added depot.
VMware ESXi Installation and Setup
VMware, Inc. 65