Get-SCUserRoleQuota

Gets a user role quota.

Syntax

Get-SCUserRoleQuota
   [-VMMServer <ServerConnection>]
   [[-UserRole] <UserRole>]
   [-QuotaPerUser <Boolean>]
   [-Cloud <Cloud>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The Get-SCUserRoleQuota cmdlet gets Virtual Machine Manager (VMM) user role quota objects.

This cmdlet returns two user role quota objects for a self-service user role per private cloud. One object contains information about the role-level quota. The other object contains information about member-level quota. Specify a value of $True for the QuotaPerUser cmdlet to return only the member-level quota object. Specify a value of $False for the cmdlet to return only the role-level quota object.

Examples

Example 1: Get per-user virtual machine count quota

PS C:\> $Cloud = Get-SCCloud -Name "Cloud01"
PS C:\> $Role = Get-SCUserRole -Name "ContosoSelfServiceUsers"
PS C:\> $Quota = Get-SCUserRoleQuota -Cloud $Cloud -UserRole $Role -QuotaPerUser $True
PS C:\> Write-Output $Quota.VMCount

The first command gets the private cloud object named Cloud01, and then stores that object in the $Cloud variable.

The second command gets the user role object named ContosoSelfServiceUsers, and then stores that object in the $Role variable.

The third command gets the user role quota for the private cloud stored in $Cloud and user role stored in $Role. Because the QuotaPerUser parameter has a value of $True, this command gets the quota for members.

The last command displays the virtual machine count quota.

Parameters

-Cloud

Specifies a private cloud object in which this cmdlet gets user role quotas.

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

-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

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

-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

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

-QuotaPerUser

Indicates whether this cmdlet gets user level quotas or member level quotas. Specify a value of $True to get member level quotas. Specify a value of $False to get role level quotas. If you do not specify this parameter, the cmdlet returns both types of quotas.

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

-UserRole

Specifies a user role object for which this cmdlet gets user role quotas.

Type:UserRole
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object on which this cmdlet gets user role quotas.

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

Outputs

UserRoleQuota

This cmdlet returns a UserRoleQuota object.