You can examine software depots and VIBs with Image Builder PowerCLI cmdlets. This workflow illustrates examining depot contents and includes examples of wildcard usage.
The workflow itself passes parameters by name, the example below passes parameters as objects by accessing variables.
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.
Examining depot contents is facilitated by the use of filtering options and wildcard characters.
At the PowerShell prompt, add the depot that you want to examine 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.
Download the ZIP file to a local file path, but do not unzip it.
Run Add-EsxSoftwareDepot -DepotUrl C:\file_path\offline-bundle.zip
Retrieve image profiles.
You can filter by vendor, name and acceptance level.
Returns an array of ImageProfile objects from all depots you added to the session.
Get-EsxImageProfile -Vendor "C*"
Returns all image profiles create by a vendor with a name that starts with a
Retrieve software packages by using Get-EsxSoftwarePackage.
You can filter, for example by vendor or version, and you can use the standard PowerShell wildcard characters.
Get-EsxSoftwarePackage -Vendor "V*"
Returns all software packages from a vendor with a name that starts with a
Get-EsxSoftwarePackage -Vendor "V*" -Name "*scsi*"
Returns all software packages with a name that has the string
scsiin it from a vendor with a name that starts with a
Get-EsxSoftwarePackage -Version "2.0*"
Returns all software packages with a version string that starts with a
Use -Newest to find the newest package.
Get-EsxSoftwarePackage -Vendor "V*" -Newest
Returns the newest package for the vendors starting with V and displays the information as a table.
Get-EsxSoftwarePackage -Vendor "V*" -Newest | format-list
Pipes the output of the request for software packages to the PowerShell format-list cmdlet and displays detailed information about each software package.
Display the list of VIBs in the image profile.
(Get-EsxImageProfile -Name "Robin's Profile").VibList
VibList is a property of the ImageProfile object. See Structure of ImageProfile, SoftwarePackage, and ImageProfileDiff Objects.
Retrieve software packages released before or after a certain date by using the CreatedBefore or CreatedAfter parameter.
Get-EsxSoftwarePackage -CreatedAfter 7/1/2010
Depot Content Examination Using Variables
This example workflow 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