vSphere PowerCLI Reference

Apply-ESXImageProfile

Synopsis

Associates the specified image profile with the specified ESXi system.

Syntax

Apply-ESXImageProfile [-ImageProfile] <ImageProfile> [-Entities] <VIObjectCore[]> [<CommonParameters>]

Related Commands

Get-ESXImageProfile
Get-VMHost

Detailed Description

Associates the specified image profile with the specified ESXi system. Currently, the Entities parameter can point only to ESXi hosts.

You must have the "AutoDeploy.Profile.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ImageProfileImageProfileImage profile to associate with the specified ESXi host.truefalse
EntitiesVIObjectCore[]Must be an ESXi host. Use the Get-VMHost PowerCLI cmdlet to find a host.truetrue (ByValue)

Return Type

Notes

Examples

-------------- Example 1 --------------

C:\PS> Apply-ESXImageProfile "MyImage" "h1","h2"

Associate the "MyImage" image profile with the hosts named "h1" and "h2".

-------------- Example 2 --------------

C:\PS> $img = Get-ESXImageProfile -Name "MyImage"  C:\PS> Apply-ESXImageProfile $img (Get-VMHost "h1")

Associate an image profile with the host named "h1" using PowerCLI objects.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.