Get-SpbmStoragePolicy
This cmdlet returns all available requirement policies and resource policies.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional | Capability | SpbmCapability[] | named |
|
Filters the storage policies by capability schema. |
optional | Name | String[] | named |
|
Filters the storage policies by name. |
optional | Namespace | String[] | named |
|
Filters the storage policies by namespace. |
optional | ProgressAction | ActionPreference | named |
|
|
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 |
|
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 |
|
Filters the storage policies by tag. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional | Id | 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 | ProgressAction | ActionPreference | named |
|
|
optional | Server | 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.SpbmStoragePolicyExamples
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 exports the specified storage policy to a file.
This cmdlet returns all available requirement policies and resource policies.
This cmdlet imports a storage policy from a file.
This cmdlet creates a requirement storage policy in an SPBM server.
This cmdlet deletes storage policies.
This cmdlet overrides the current name, description, and rule sets of an existing storage policy in an SPBM server.