Set-SCUserRoleQuota

Modifies the settings for a user role quota.

Syntax

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

-Cloud

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

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

-CPUCount

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

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

-CustomQuotaCount

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

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

-JobVariable

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

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

-MemoryMB

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

Type:Int32
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

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

-UserRoleQuota

Specifies a user role quota object.

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

-VMCount

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

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

-VMMServer

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

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

Outputs

UserRoleQuota

This cmdlet returns a UserRoleQuota object.