共用方式為


Add-AzLabServicesUserQuota

新增其他使用者配額的 API。

語法

Add-AzLabServicesUserQuota
   [-SubscriptionId <String>]
   -UsageQuotaToAddToExisting <TimeSpan>
   -User <User>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-AzLabServicesUserQuota
   -ResourceGroupName <String>
   -LabName <String>
   -Email <String>
   [-SubscriptionId <String>]
   -UsageQuotaToAddToExisting <TimeSpan>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

新增其他使用者配額的 API。

範例

範例 1:增加學生使用量配額。

Add-AzLabServicesUserQuota -ResourceGroupName "group name" -LabName "lab name" -Email 'student@contoso.com' -UsageQuotaToAddToExisting $(New-TimeSpan -Hours 4)

Name           Type
----           ----
testuser       Microsoft.LabServices/labs/users

此命令會將學生配額增加 4 小時。

範例 2:使用 User 物件增加學生使用量配額。

$user = Get-AzLabServicesUser -ResourceGroupName "group name" -LabName "lab name" -UserName 'ContosoUser12345'
$user | Add-AzLabServicesUserQuota -UsageQuotaToAddToExisting $(New-TimeSpan -Hours 5)

Name                 Type
----                 ----
ContosoUser12345     Microsoft.LabServices/labs/users

將學生配額增加 5 小時。

參數

-AsJob

以作業身分執行命令

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Email

在包含實驗室內識別它的用戶名稱。 用於資源 URI。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-LabName

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SubscriptionId

目標訂用帳戶的標識碼。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-UsageQuotaToAddToExisting

除了目前的使用者配額之外,使用者取得的使用量配額時間。

類型:TimeSpan
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-User

若要建構,請參閱USER屬性的NOTES區段並建立哈希表。

類型:User
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出