Import-SpbmStoragePolicy
This cmdlet imports a storage policy from a file. The file path must be accessible from the VMware PowerCLI client side.
Syntax
[-Name]
<String>
-FilePath <String>
[-Description <String>]
[-Server <VIServer[]>]
[CommonParameters]
-FilePath <String>
[-Description <String>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | 1 |
|
Specifies a name of the imported storage policy. The maximum length of the name is 80 characters. | required |
|
String | named |
|
Specifies the path to the file, from which you want to import a storage policy. If relative, it is relative to the current PS provider path. | optional |
|
String | named |
|
Specifies a description for the imported storage policy. | 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
Import-SpbmStoragePolicy -Name "MyPolicy" -Description "PolicyDescription" -FilePath C:\policy.xml
Imports a storage policy with name "MyPolicy" and description "PolicyDescription" from the policy.xml file to a server. A new storage policy is created on the server.
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.