Get-SpbmStoragePolicy

This cmdlet returns all available requirement policies and resource policies.

Syntax

[-Capability  <SpbmCapability[]>]
[-Name  <String[]>]
[-Namespace  <String[]>]
[-Requirement]
[-Resource]
[-Server  <VIServer[]>]
[-Tag  <Tag[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
Capability
SpbmCapability[] named
  • wildcards
  • Filters the storage policies by capability schema.
    optional
    Name
    String[] named
  • wildcards
  • Filters the storage policies by name.
    optional
    Namespace
    String[] named
  • wildcards
  • Filters the storage policies by namespace.
    optional
    Requirement
    SwitchParameter named Specifies the policy category. Policy category can be either "requirement" or "resource". If nothing specified, retrieves both.
    optional
    Resource
    SwitchParameter named Specifies the policy category. Policy category can be either "requirement" or "resource". If nothing specified, retrieves both.
    optional
    Server
    VIServer[] named
  • wildcards
  • pipeline
  • 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.
    optional
    Tag
    Tag[] named
  • wildcards
  • Filters the storage policies by tag.

    [-Id  <String[]>]
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    Id
    String[] named Filters the storage policies by ID.
    optional
    Server
    VIServer[] named
  • wildcards
  • pipeline
  • 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

    Get-SpbmStoragePolicy -Name "MyPolicy"

    Returns all storage policies named "MyPolicy".

    Example 2

    Get-SpbmStoragePolicy -Requirement -Namespace "VSAN" -Tag $tag1, $tag2

    Returns all storage policies of type Requirement containing one or more rules which contain one or more capabilities from the "VSAN" namespace and any of the $tag1 or $tag2 tags.

    Example 3

    Get-SpbmStoragePolicy -Id "PolicyId"

    Returns a storage policy with ID "PolicyId".

    Related Commands

    Feedback

    Was this page helpful?