Add-MgmtSvcQuotaSetting

Add-MgmtSvcQuotaSetting

Adds a setting to a quota.

Syntax

Parameter Set: ByProperties
Add-MgmtSvcQuotaSetting [-Quota] <ServiceQuota> [-Key] <String> [-Value] <String> [ <CommonParameters>]

Parameter Set: ByObject
Add-MgmtSvcQuotaSetting [-Quota] <ServiceQuota> [[-Setting] <ServiceQuotaSetting> ] [ <CommonParameters>]


 

Detailed Description

The Add-MgmtSvcQuotaSetting cmdlet adds a setting to a quota object.

Parameters

-Key<String>

Specifies a key.

 

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Quota<ServiceQuota>

Specifies a service quota object.

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Setting<ServiceQuotaSetting>

Specifies a quota setting.

 

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Value<String>

Specifies a value for the setting.

 

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Examples

Example 1: Add a quota setting

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.

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}]'

 

Related topics

Add-MgmtSvcListQuota