vSphere PowerCLI Reference



This cmdlet creates a requirement storage policy in an SPBM server.


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

Related Commands

Online version

Detailed Description

This cmdlet creates a requirement storage policy in an SPBM server. A requirement policy contains requirements that are derived from tag-defined capabilities or from VMware VSAN capabilities.
A policy is a collection of rule sets. A rule set references storage capabilities and defines requirements based on those capabilities.

You can use the following styles when creating a new policy.

# Style 1:
-Name ...
-RuleSet (
New-SpbmRuleSet (
(New-SpbmRule EmcStorage MaxLatency 45),
(New-SpbmRule EmcStorage Something (Range 2 14)),
New-SpbmRuleSet (
(New-SpbmRule SpbmCore Throughput 5),
(New-SpbmRule -Tag $supportsThinProvisioning)

# Style 2:
$r = New-SpbmRule -Namespace ... -Capability ... -Value ...
$rs = New-SpbmRuleSet -Rule $r
$sp = New-SpbmStoragePolicy -RuleSet $rs


NameTypeDescriptionRequired?Pipeline InputDefault Value
AnyOfRuleSetsSpbmRuleSet[]Specifies an array of rule sets that define the storage requirements.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
DescriptionStringSpecifies the text description associated with the policy.falsefalse
NameStringSpecifies the name of the capability-based policy to be created. The maximum length of the name is 80 characters.truefalse
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)
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 newly created SpbmStoragePolicy object


Works only with vCenter Server 5.5 or later.


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

New-SpbmStoragePolicy -Name "MyPolicy" -Description "MyPolicyDescription" -AnyOfRuleSets $ruleset1, $ruleset2, $ruleset3

Creates a new storage policy named "MyPolicy", with description "MyPolicyDescription" and with rule set objects $ruleset1, $ruleset2 and $ruleset3.

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

New-SpbmStoragePolicy -Name "MyPolicy" -AnyOfRuleSets (New-SpbmRuleSet -AllOfRules $rule1, $rule2, $rule3)

Creates a new storage policy named "MyPolicy" with a rule set containing rule objects $rule1, $rule2, and $rule3.

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