vSphere PowerCLI Reference

Set-SpbmStoragePolicy

Synopsis

This cmdlet overrides the current name, description, and rule sets of an existing storage policy in an SPBM server.

Syntax

Set-SpbmStoragePolicy -StoragePolicy <SpbmStoragePolicy[]> [-Name <String>] [-Description <String>] [-AnyOfRuleSets <SpbmRuleSet[]>] [-Server <VIServer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-SpbmStoragePolicy
Get-SpbmStoragePolicy
Import-SpbmStoragePolicy
New-SpbmStoragePolicy
Remove-SpbmStoragePolicy

Detailed Description

This cmdlet overrides the current name, description, and rule sets of an existing storage policy in an SPBM server.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
AnyOfRuleSetsSpbmRuleSet[]Specifies an array to overwrite the current rule sets in the policy.falsefalse
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
DescriptionStringSpecifies a new description for the storage policyfalsefalse
NameStringSpecifies a new name for the storage policy. The maximum length of the name is 80 characters.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.falsetrue (ByValue)
StoragePolicySpbmStoragePolicySpecifies the storage policy to modify.truetrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The modified SpbmStoragePolicy object

Notes

Works only with vCenter Server 5.5 or later.

Examples

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

Set-SpbmStoragePolicy -StoragePolicy $policy -Name "NewName" -Description NewDescription

Modifies the name and description of the $policy policy object.

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

Set-SpbmStoragePolicy -StoragePolicy $policy -AnyOfRuleSets $ruleset1, $ruleset2

Updates the $policy policy object with the $ruleset1 and $ruleset2 rule set objects which overwrite the existing rule sets in the policy.


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