Syntax
Remove-WMNamespaceStoragePolicy [-NamespaceStoragePolicy] <WMNamespaceStoragePolicy[]> [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Detailed Description
This cmdlet deletes the storage claim for a workload namespace associated with a specified storage policy. Pods, that use persistent storage from the earlier version of storage policies, can access them till the datastores are attached to the worker nodes. To get the existing storage claims, see the Get-WMNamespaceStoragePolicy cmdlet. The cmdlet requires a connection to vCenter Server using the Connect-VIServer cmdlet.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
NamespaceStoragePolicy | WMNamespaceStoragePolicy[] | Specifies the storage claims that you want to remove. | true | True (ByValue) | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
System.ObjectNotes
Examples
-------------------------- Example 1 --------------------------
PS C:\> $sp = Get-WMNamespaceStoragePolicy -Namespace "MyNamespace" | where { $_.StoragePolicy.Name -eq "MyStoragePolicy" } PS C:\> Remove-WMNamespaceStoragePolicy $sp
Deletes a storage claim for the workload namespace "MyNamespace" associated with the "MyStoragePolicy" storage policy.
-------------------------- Example 2 --------------------------
PS C:\> Get-WMNamespaceStoragePolicy -Namespace "MyNamespace" | where { $_.StoragePolicy.Name -eq "MyStoragePolicy" } | Remove-WMNamespaceStoragePolicy
Deletes a storage claim for the workload namespace "MyNamespace" associated with the "MyStoragePolicy" storage policy.