Set-SCUserRoleQuota

Modifies the settings for a user role quota.

Syntax

Set-SCUserRoleQuota [-CPUCount <Int32>] -Cloud <Cloud> [-CustomQuotaCount <Int32>] -JobGroup <Guid>
 [-JobVariable <String>] [-MemoryMB <Int32>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-QuotaPerUser] [-RunAsynchronously] [-StorageGB <Int32>] [-UseCPUCountMaximum]
 [-UseCustomQuotaCountMaximum] [-UseMaximumQuota] [-UseMemoryMBMaximum] [-UseStorageGBMaximum]
 [-UseVMCountMaximum] [-VMCount <Int32>] [-VMMServer <ServerConnection>] [<CommonParameters>]
Set-SCUserRoleQuota [-CPUCount <Int32>] [-CustomQuotaCount <Int32>] [-JobVariable <String>] [-MemoryMB <Int32>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-StorageGB <Int32>] [-UseCPUCountMaximum] [-UseCustomQuotaCountMaximum] [-UseMemoryMBMaximum]
 [-UseStorageGBMaximum] [-UseVMCountMaximum] -UserRoleQuota <UserRoleQuota> [-VMCount <Int32>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]
Set-SCUserRoleQuota [-JobVariable <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-QuotaPerUser] [-RunAsynchronously] [-UseMaximumQuota] [-UserRoleQuota <UserRoleQuota>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Set-SCUserRoleQuota cmdlet modifies the settings for a Virtual Machine Manager (VMM) user role quota.

Examples

Example 1: Increase 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 $False
PS C:\> Write-Output $Quota.VMCount
PS C:\> if ($Quota.VMCount -lt 20) {Set-SCUserRoleQuota -UserRoleQuota $Quota -VMCount 20}

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

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

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

The fourth command displays the virtual machine count quota.

The final command determines whether the virtual machine quota is less than 20. If it is, then it sets the quota to 20.

Parameters

-CPUCount

Specifies the number of virtual CPUs for a user role quota.

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

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

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

Specifies the number of custom quota points for a user role quota.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobGroup

Specifies an identifier for a series of commands that runs as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies a variable in which job progress is tracked and stored.

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

Specifies the amount of memory, in megabytes (MB), for a user role quota.

Type:Int32
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-QuotaPerUser

Indicates that this sets member level quotas. Specifying $False indicates role level quotas. If the parameter is not used, both quotas are set or returned.

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

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

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

Specifies the amount of storage, in gigabytes (GB), for a user role quota. This storage amount does not include library storage.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseCPUCountMaximum

Indicates that the maximum number of virtual CPUs is allowed for a user role. If you specify this parameter, VMM does not enforce a user role quota for the virtual CPU dimension.

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

Indicates that the maximum number of custom quota points is allowed for a user role. If you specify this parameter, VMM does not enforce a user role quota for the custom quota dimension.

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

Indicates that all quota dimensions are set to maximum. If you specify this parameter, VMM does not enforce user role quotas.

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

Indicates that the maximum amount of memory, in megabytes, is allowed for a user role. If you specify this parameter, VMM does not enforce a user role quota for the memory dimension.

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

Indicates that the maximum amount of storage, in gigabytes, is allowed for a user role. If you specify this parameter, VMM does not enforce a user role quota for the storage dimension.

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

Indicates that the maximum number of virtual machines is allowed for a user role. If you specify parameter, VMM does not enforce a user role quota for the virtual machine dimension.

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

Specifies a user role quota object.

Type:UserRoleQuota
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMCount

Specifies the number of virtual machines for a user role quota.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server on which this cmdlet modifies a user role quota.

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

Outputs

UserRoleQuota

This cmdlet returns a **UserRoleQuota** object.