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.
1 |
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.
| ||||
2 |
You can filter by vendor, name and acceptance level.
| ||||
3 |
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. | ||||
4 |
Use -Newest to find the newest package. | ||||
5 |
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. | ||||
6 |
Retrieve software packages released before or after a certain date by using the CreatedBefore or CreatedAfter parameter. |
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