PowerCLI Reference

Set-WMNamespaceStoragePolicy

Synopsis

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

Syntax

Set-WMNamespaceStoragePolicy [-NamespaceStoragePolicy] <WMNamespaceStoragePolicy[]> -LimitMiB <Int64> [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

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.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NamespaceStoragePolicyWMNamespaceStoragePolicy[]Specifies the storage claims whose configuration you want to change.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
LimitMiBInt64Specifies 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.trueFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

VMware.VimAutomation.WorkloadManagement.Types.V1.WMNamespaceStoragePolicy

Notes

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.


Copyright © VMware, Inc. All rights reserved.