Set-SCUserRoleQuota

Modifies the settings for a user role quota.

Syntax

Values

Set-SCUserRoleQuota
    -UserRoleQuota <UserRoleQuota>
    [-VMMServer <ServerConnection>]
    [-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>]

UseDefault

Set-SCUserRoleQuota
    [-VMMServer <ServerConnection>]
    [-UserRoleQuota <UserRoleQuota>]
    [-UseMaximumQuota]
    [-QuotaPerUser]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

JobGroup

Set-SCUserRoleQuota
    -JobGroup <Guid>
    -Cloud <Cloud>
    [-VMMServer <ServerConnection>]
    [-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.

Parameter properties

Type:Cloud
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

JobGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CPUCount

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomQuotaCount

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

JobGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MemoryMB

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OnBehalfOfUser

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:UserRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UseDefault
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageGB

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseMaximumQuota

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UseDefault
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserRoleQuota

Specifies a user role quota object.

Parameter properties

Type:UserRoleQuota
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMCount

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Values
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
JobGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

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

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

UserRoleQuota

This cmdlet returns a UserRoleQuota object.