VMware VS4-ENT-PL-A Setup Guide - Page 246
Example: Editing Image Profiles with Variables
![]() |
View all VMware VS4-ENT-PL-A manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 246 highlights
vSphere Installation and Setup 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 2 Pipe the image profile you intend to edit to format-list to see detailed information. In this example, the image profile created in "Creating Image Profiles from Scratch Workflow," on page 244 contains only the base image. A newly created image profile is not included in the depot. Instead, you access the image profile by name or by binding it to a variable. Get-EsxImageProfile "Test #2" | format-list PowerShell returns the formatted information. Name Vendor ... VibList : Test #2 : Vendor42 : {esx-base 5.0.0.-...,} 3 (Optional) If you are adding a VIB with a lower acceptance level than the image profile's level, change the acceptance level of the image profile. Set-EsxImageProfile -ImageProfile "Test #2" -AcceptanceLevel VMwareAccepted PowerShell returns the information about the changed profile in tabular format. Name ---Test #2 Vendor -----Vendor42 Last Modified Acceptance Level 9/22/2010 12:05:... VMwareAccepted 4 Add a software package (VIB) to the image profile. You can add the package by name. Add-EsxSoftwarePackage -ImageProfile "Test #2" -SoftwarePackage NewPack3 PowerShell returns the information about the image profile in tabular format. Name ---Test #2 Vendor -----Vendor42 Last Modified Acceptance Level 9/22/2010 12:05:... VMwareAccepted 5 Display the image profile again. Get-EsxImageProfile "Test #2" | format-list The VIB list is updated to include the new software package and the information is displayed. Name Vendor ... VibList : Test #2 : Vendor42 : {esx-base 5.0.0.-..., NewPack3} Example: Editing Image Profiles with Variables This cmdlet sequence repeats the steps of the 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. Add-EsxSoftwareDepot -DepotUrl depot_url $ip2 = Get-EsxImageProfile -name "Test #2" $ip2 | format-list Set-EsxImageProfile -ImageProfile $ip2 -AcceptanceLevel VMwareAccepted Add-EsxImageSoftwarePackage -ImageProfile $ip2 -SoftwarePackage NewPack3 $ip2 | format-list 246 VMware, Inc.
![](/manual_guide/products/vmware-vs4entpla-setup-guide-9cc0699/246.png)