vSphere PowerCLI Reference

Set-SpbmEntityConfiguration

Synopsis

This cmdlet sets SPBM-related configuration data for VirtualMachine, HardDisk and Cluster objects.

Syntax

Set-SpbmEntityConfiguration -Configuration <SpbmEntityConfiguration[]> [-SpbmEnabled [<Boolean>]] [-StoragePolicy <SpbmStoragePolicy>] [-Server <VIServer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-SpbmEntityConfiguration

Detailed Description

This cmdlet sets SPBM-related configuration data for VirtualMachine, HardDisk and Cluster objects. The configuration data includes storage policy association for VirtualMachine and HardDisk objects and SPBM enablement for Cluster objects.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ConfigurationSpbmEntityConfiguration[]Specifies the configuration to modify. The supported types are SpbmClusterConfiguration, SpbmVMConfiguration, and SpbmHardDiskConfiguration.
This parameter supports OBN based on the names of the associated Cluster and VirtualMachine objects. This parameter also directly accepts objects of type Cluster, VirtualMachine, and HardDisk by silently converting them to the corresponding configuration object through a ArgumentTransformationAttribute object.
truetrue (ByValue)
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
ServerVIServerSpecifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
SpbmEnabledBooleanIndicates whether to enable or disable SPBM on a cluster.
Only applicable to SpbmClusterConfiguration objects. Attempts to apply to other configuration objects are ignored.
falsefalse
StoragePolicySpbmStoragePolicySpecifies the storage policy to be applied to all VirtualMachine and HardDisk objects defined in the Configuration objects. If the value is $null, removes the current policy association.
Only applicable to VirtualMachine and HardDisk configuration objects. Attempts to apply to Cluster configuration objects are ignored.
If StoragePolicy is not specified, the current policy association is removed.
falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

A list of modified objects derived from SpbmEntityConfiguration. Types include SpbmVMConfiguration, SpbmHardDiskConfiguration, SpbmClusterConfiguration. Returns one output object for each input object. For example, if a virtual machine does not have a storage policy, the cmdlet returns a result for it with the policy property set to $null.

Notes

Works only with vCenter Server 5.5 or later.

Examples

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

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $cluster1) -SpbmEnabled $true

Enables SPBM for the $cluster1 cluster.

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

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $cluster1) -SpbmEnabled $false

Disables SPBM for the $cluster1 cluster.

-------------- Example 3 --------------

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $vm1, $vm2) -StoragePolicy $policy

Associates the $policy storage policy to the $vm1 and $vm2 virtual machines.

-------------- Example 4 --------------

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $hd1) -StoragePolicy $policy

Associates the $policy storage policy to the $hd1 hard disk.

-------------- Example 5 --------------

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $vm1) -StoragePolicy $null

Removes the association of the $vm1 virtual machine from the storage policy it is associated with, if any.

-------------- Example 6 --------------

Set-SpbmEntityConfiguration -Configuration (Get-SpbmEntityConfiguration $hd1) -StoragePolicy $null

Removes the association of the $hd1 hard disk from the storage policy it is associated with, if any.

-------------- Example 7 --------------

Set-SpbmEntityConfiguration -Configuration "MyVM" -StoragePolicy $null

Removes the association of the "MyVM" virtual machine from the storage policy it is associated with, if any.

-------------- Example 8 --------------

Set-SpbmEntityConfiguration -Configuration "MyCluster" -SpbmEnabled $true

Enables SPBM for the "MyCluster" cluster.

-------------- Example 9 --------------

Set-SpbmEntityConfiguration -Configuration $vm, $hd

Removes the association of the virtual machine $vm and hard disk $hd from the storage policy they are associated with, if any.


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