PowerCLI Reference

Remove-WMNamespaceStoragePolicy

Synopsis

This cmdlet deletes the storage claim for a workload namespace associated with a specified storage policy.

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

NameTypeDescriptionRequired?Pipeline InputDefault Value
NamespaceStoragePolicyWMNamespaceStoragePolicy[]Specifies the storage claims that you want to remove.trueTrue (ByValue)
ConfirmSwitchParameterIf 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.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

System.Object

Notes

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.


Copyright © VMware, Inc. All rights reserved.