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
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
NamespaceStoragePolicy | WMNamespaceStoragePolicy[] | Specifies the storage claims whose configuration you want to change. | true | True (ByValue) | |
Confirm | SwitchParameter | If 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. | false | False | |
LimitMiB | Int64 | 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. | true | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
VMware.VimAutomation.WorkloadManagement.Types.V1.WMNamespaceStoragePolicyNotes
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.