Set-WMNamespaceStoragePolicy

This cmdlet modifies the configuration of a storage claim used by a workload namespace. The cmdlet requires a connection to vCenter Server using the Connect-VIServer cmdlet.

Syntax

-LimitMiB  <Int64>
-NamespaceStoragePolicy  <WMNamespaceStoragePolicy[]>
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
LimitMiB
Int64 named Specifies the new limit on the storage used by workloads running in the workload namespace using the corresponding storage policy. To remove the limit, specify $null.
required
NamespaceStoragePolicy
WMNamespaceStoragePolicy[] named
  • pipeline
  • Specifies the storage claims whose configuration you want to change.

    Output

    VMware.VimAutomation.WorkloadManagement.Types.V1.WMNamespaceStoragePolicy

    Examples


    Example 1

    PS C:\> Get-WMNamespaceStoragePolicy -Namespace "MyNamespace" | where { $_.StoragePolicy.Name -eq "MyStoragePolicy" } | Set-WMNamespaceStoragePolicy -LimitMiB 1000

    Changes the limit on the storage used by the workload namespace "MyNamespace" using the storage policy "MyStoragePolicy" to 1000 MiB.

    Example 2

    PS C:\> $allStorageForMyNamespace = Get-WMNamespaceStoragePolicy -Namespace "MyNamespace"
    PS C:\> Set-WMNamespaceStoragePolicy -NamespaceStoragePolicy $allStorageForMyNamespace -LimitMiB $null

    Removes the limit on the storage used by the workload namespace "MyNamespace" for all the storage policies currently used by this workload namespace.

    Related Commands

    Feedback

    Was this page helpful?