PowerCLI Reference

vSphere Auto Deploy Reference

Set-ScriptBundleAssociation

Synopsis

Associates the specified script bundle with the specified ESXi system.

Syntax

Set-ScriptBundleAssociation [-ScriptBundle] <ScriptBundle> [-Entities] <VIObjectCore[]> [<CommonParameters>]

Related Commands

Get-ScriptBundle
Get-VMHost

Detailed Description

Associates the specified script bundle 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

Name Type Description Required? Pipeline Input Default Value
ScriptBundle ScriptBundle Script bundle to associate with the specified ESXi host. true false
Entities VIObjectCore[] Must be an ESXi host. Use the Get-VMHost PowerCLI cmdlet to find a host. true true (ByValue)

Return Type

Notes

Examples

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

C:\PS> Set-ScriptBundleAssociation "MyBundle" "h1","h2"

Associate the "MyBundle" script bundle with the hosts named "h1" and "h2".

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

C:\PS> $bndl = Get-ScriptBundle -Name "MyBundle"
C:\PS> Set-ScriptBundleAssociation $bndl (Get-VMHost "h1")

Associate a script bundle with the host named "h1" using PowerCLI objects.


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