Set-SpbmStoragePolicy
This cmdlet overrides the current name, description, and rule sets of an existing storage policy in an SPBM server.
Syntax
-StoragePolicy
<SpbmStoragePolicy[]>
[-AnyOfRuleSets <SpbmRuleSet[]>]
[-CommonRule <SpbmRule[]>]
[-Description <String>]
[-Name <String>]
[-Server <VIServer[]>]
[CommonParameters]
[-AnyOfRuleSets <SpbmRuleSet[]>]
[-CommonRule <SpbmRule[]>]
[-Description <String>]
[-Name <String>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
SpbmStoragePolicy[] | named |
|
Specifies the storage policy to modify. | optional |
|
SpbmRuleSet[] | named |
|
Specifies an array to overwrite the current rule sets in the policy. The SPBM rule sets should not contain SPBM rules from the VAIOFilter namespace. | optional |
|
SpbmRule[] | named |
|
Specifies the SPBM rules from the VAIOFilter namespace only. These rules are considered with all the SPBM rule sets as common requirements. | optional |
|
String | named |
|
Specifies a new description for the storage policy. | optional |
|
String | named |
|
Specifies a new name for the storage policy. The maximum length of the name is 80 characters. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. |
Output
VMware.VimAutomation.Storage.Types.V1.Spbm.SpbmStoragePolicy
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.
Example 3
$p2 = Set-SpbmStoragePolicy -StoragePolicy $p1 -CommonRule $cr
Modifies a storage policy to add a VAIOFilter rule.
Example 4
$p2 = Set-SpbmStoragePolicy -StoragePolicy $p1 -CommonRule @()
Modifies a storage policy to remove all VAIOFilter rules.
Example 5
$p2 = Set-SpbmStoragePolicy -StoragePolicy $p1 -CommonRule @($cr1, $cr2)
Modifies a storage policy to add a VAIOFilter rule $cr2 to an existing VAIOFilter rule $cr1.
Related Commands
SpbmStoragePolicy
This cmdlet returns all available requirement policies and resource policies.
This cmdlet exports the specified storage policy to a file.
This cmdlet imports a storage policy from a file.
This cmdlet overrides the current name, description, and rule sets of an existing storage policy in an SPBM server.
This cmdlet deletes storage policies.
This cmdlet creates a requirement storage policy in an SPBM server.