New-SpbmRule

This cmdlet creates an SPBM rule in the client side.

Syntax

[-Value]  <Object>
-Capability  <SpbmCapability>
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Value
Object 1 Specifies a capability property value. A property value is a single value or a collection of values. A single property value is expressed as a scalar value (Object), while a collection of values is expressed as a range of values (VMware.VimAutomation.VICore.Types.V1.Range), or an array (Object[]) of values. The type of each value can be Long, Int, String, Boolean, Double, DateTime, or TimeSpan.
required
Capability
SpbmCapability named
  • wildcards
  • Specifies an SPBM capability object. You must select one of the available capability objects for the given namespace. OBN for this object uses full name of the object, including the namespace name. You can find all available Capability objects and their data types under a namespace by using the Get-SpbmCapability cmdlet.
    optional
    Server
    VIServer[] named
  • wildcards
  • 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 the Connect-VIServer cmdlet.

    -AnyOfTags  <Tag[]>
    [-Server  <VIServer[]>]
    [-SpbmOperatorType  <SpbmOperatorType>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    AnyOfTags
    Tag[] named
  • wildcards
  • Specifies tag objects for the new rule. All specified tags should be of the same tag category. You can find all available tags by running the Get-Tag cmdlet. You can use the Get-TagCategory and Get-Tag cmdlets to find a specific tag.
    optional
    Server
    VIServer[] named
  • wildcards
  • 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 the Connect-VIServer cmdlet.
    optional
    SpbmOperatorType
    SpbmOperatorType named Specifies the logical operator for the values. Currently only NOT is supported.

    Output

    VMware.VimAutomation.Storage.Types.V1.Spbm.SpbmRule

    Examples


    Example 1

    New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.forceProvisioning") -Value $true

    Creates a new SPBM rule with capability named "VSAN.forceProvisioning" and Boolean value set to true.

    Example 2

    New-SpbmRule -Capability (Get-SpbmCapability -Name VSAN.stripeWidth) -Value 2

    Creates a new SPBM rule with capability named "VSAN.stripewidth" and integer value set to 2.

    Example 3

    New-SpbmRule -AnyOfTags (Get-Tag -Category "category1")

    Creates a new SPBM rule with all the tags from the "category1" category.

    Example 4

    New-SpbmRule -AnyOfTags $tag1, $tag2

    Creates a new SPBM rule with tag objects $tag1 and $tag2.

    Related Commands

    Feedback

    Was this page helpful?