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]
[-Name <String[]>]
[-Namespace <String[]>]
[-Requirement]
[-Resource]
[-Server <VIServer[]>]
[-Tag <Tag[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
SpbmCapability[] | named |
|
Filters the storage policies by capability schema. | optional |
|
String[] | named |
|
Filters the storage policies by name. | optional |
|
String[] | named |
|
Filters the storage policies by namespace. | optional |
|
SwitchParameter | named |
|
Specifies the policy category. Policy category can be either "requirement" or "resource". If nothing specified, retrieves both. | optional |
|
SwitchParameter | named |
|
Specifies the policy category. Policy category can be either "requirement" or "resource". If nothing specified, retrieves both. | 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. | optional |
|
Tag[] | named |
|
Filters the storage policies by tag. |
[-Id
<String[]>]
[-Server <VIServer[]>]
[CommonParameters]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
String[] | named |
|
Filters the storage policies by ID. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list. | 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
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
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.