你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Add-AzLabServicesUserQuota

API to add additional user quota.

Syntax

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 to add additional user quota.

Examples

Example 1: Increase student usage quota.

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

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

This command increase the students quota by 4 hours.

Example 2: Increase student usage quota with User object.

$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

Increase the student quota by 5 hours.

Parameters

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Email

The name of the user that uniqely identifies it within containing lab. Used in resource URIs.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LabName

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UsageQuotaToAddToExisting

The amount of usage quota time the user gets in addition to the current user quota.

Type:TimeSpan
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-User

To construct, see NOTES section for USER properties and create a hash table.

Type:User
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

User

Outputs

IUser