Set-ScriptBundleAssociation Command | Vmware PowerCLI Reference

Set-ScriptBundleAssociation

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.

Syntax

Set-ScriptBundleAssociation
[ -Entities ] < VIObjectCore[] >
-Bundle < ScriptBundle >
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Entities VIObjectCore[] 1
  • pipeline
Must be an ESXi host. Use the Get-VMHost PowerCLI cmdlet to find a host.
required
Bundle ScriptBundle named
optional ProgressAction ActionPreference named

Output

Examples

Example 1

Set-ScriptBundleAssociation "MyBundle" "h1","h2"

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

Example 2

$bndl = Get-ScriptBundle -Name "MyBundle"
Set-ScriptBundleAssociation $bndl (Get-VMHost "h1")

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

Related Commands

ScriptBundle

The cmdlet will take in the file URI to the script bundle and upload it to Auto Deploy. The name of the script bundle will be used as the identifier for the object minus the tgz extension.

Gets a ScriptBundle object.

The cmdlet takes in a script bundle and removes it from Auto Deploy.

ScriptBundleAssociation

Associates the specified script bundle with the specified ESXi system.