Add-MgmtSvcQuotaSetting
Adds a setting to a quota.
Syntax
Add-MgmtSvcQuotaSetting
[-Quota] <ServiceQuota>
[-Key] <String>
[-Value] <String>
[<CommonParameters>]
Add-MgmtSvcQuotaSetting
[-Quota] <ServiceQuota>
[[-Setting] <ServiceQuotaSetting>]
[<CommonParameters>]
Description
The Add-MgmtSvcQuotaSetting cmdlet adds a setting to a quota object.
Examples
Example 1: Add a quota setting
PS C:\> $sqlserverRP = Get-MgmtSvcResourceProvider -AdminUri "https://Computer01:30004" -Token $Token -DisableCertificateValidation -Name sqlservers
PS C:\> $QuotaList = New-MgmtSvcQuotaList
PS C:\> $SqlQuota = Add-MgmtSvcListQuota -QuotaList $QuotaList -ServiceName sqlservers -ServiceInstanceId $sqlserverRP.InstanceId
PS C:\> Add-MgmtSvcQuotaSetting -Quota $SqlQouta -Key Editions -Value '[{"displayName":"Default","groupName":"Default","resourceCount":"10","resourceSize":"1024","resourceSizeLimit":"1024","offerEditionId":"081313063701","groupType":null}]'
NOTE: This example assumes that you have created a token by using Get-MgmtSvcToken and have stored it in a variable named $Token.
The first command gets the resource provider object named sqlservers and stores the object in ther $sqlserverRP variable.
The second command creates a quota list and stores the quota list object in the $QuotaList variable.
The third command adds the list quota and stores the quota object in the $SqlQuota variable.
The last command adds the quota setting.
Parameters
-Key
Specifies a key.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Quota
Specifies a service quota object.
Type: | ServiceQuota |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Setting
Specifies a quota setting.
Type: | ServiceQuotaSetting |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Value
Specifies a value for the setting.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |