Change System Center 2012 SP1 Virtual Machine Manager Tenant Quota

Change System Center 2012 SP1 Virtual Machine Manager Tenant Quota

Q: How do I change a System Center 2012 Virtual Machine Manager tenant quota by using Windows PowerShell?

A: Everything that can be achieved in the System Center 2012 Virtual Machine Manager (SCVMM) console can be performed using PowerShell. Even when you perform an action using the graphical interface, there's an option to output the PowerShell script that SCVMM is actually using behind the scenes.

Therefore the easiest way to get the PowerShell script is to make the quota change once using the management console, then click the script button and use that code in your own processes. Below is an example block of code that changes quotas for the user role and each user.

Import-Module virtualmachinemanager
get-vmmserver savdalvmm12.savilltech.net
$cloud = Get-SCCloud -Name "Test Cloud"
Set-SCUserRoleQuota -Cloud $cloud -JobGroup "97c03f77-23be-4999-99b0-15cb30a24681" -CPUCount "12" -MemoryMB "12000" -StorageGB "600" -UseCustomQuotaCountMaximum -UseVMCountMaximum
Set-SCUserRoleQuota -Cloud $cloud -JobGroup "97c03f77-23be-4999-99b0-15cb30a24681" -QuotaPerUser -CPUCount "12" -MemoryMB "12000" -StorageGB "600" -UseCustomQuotaCountMaximum -UseVMCountMaximum
$userRole = Get-SCUserRole -Name "Lab Users" -ID "ba035b3a-ace8-4f7f-8df9-8fa5423956d4"
Set-SCUserRole -UserRole $userRole -Description "" -JobGroup "97c03f77-23be-4999-99b0-15cb30a24681" -Name "Lab Users" -Permission @("Author", "Checkpoint", "CreateFromVHDOrTemplate", "AllowLocalAdmin", "PauseAndResume", "CanReceive", "RemoteConnect", "Remove", "Save", "CanShare", "Shutdown", "Start", "Stop", "Store") -ShowPROTips $false

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish