Remove-WMNamespaceStoragePolicy

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.

Syntax

-NamespaceStoragePolicy  <WMNamespaceStoragePolicy[]>
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
NamespaceStoragePolicy
WMNamespaceStoragePolicy[] named
  • pipeline
  • Specifies the storage claims that you want to remove.

    Output

    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.

    Related Commands

    Feedback

    Was this page helpful?