Remove-WMNamespaceStoragePolicy Command | Vmware PowerCLI Reference

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

Remove-WMNamespaceStoragePolicy
-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:\&#62 $sp = Get-WMNamespaceStoragePolicy -Namespace "MyNamespace" | where { $_.StoragePolicy.Name -eq "MyStoragePolicy" }
PS C:\&#62 Remove-WMNamespaceStoragePolicy $sp

Deletes a storage claim for the workload namespace "MyNamespace" associated with the "MyStoragePolicy" storage policy.

Example 2

PS C:\&#62 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

WMNamespace

This cmdlet retrieves the workload namespaces in the vCenter Server system.

This cmdlet creates a new workload namespace on the specified cluster.

This cmdlet deletes a workload namespace from the vCenter Server system.

This cmdlet modifies the configuration of a workload namespace.

WMNamespaceLimits

Retrieves information about the Kubernetes resource limits of a namespace.

Changes the Kubernetes resource limits of a namespace.

WMNamespaceNetworkSpec

Creates a specification for a namespace network. The specification is later used to create the actual namespace network.

WMNamespacePermission

Retrieves information about workload namespace access permissions.

Grants an access permission to a workload namespace.

Removes an access permission to a workload namespace.

Modifies an access permission to a workload namespace.

WMNamespaceStoragePolicy

This cmdlet retrieves the configuration of the storage claimed by a workload namespace.

This cmdlet creates a storage claim for a workload namespace using the specified configuration.

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

This cmdlet modifies the configuration of a storage claim used by a workload namespace.