Change System Center 2012 SP1 Virtual Machine Manager Tenant Quota

How to change a SCVMM 2012 Virtual Machine Manager tenant quota by using Windows PowerShell.

John Savill

January 17, 2013

1 Min Read
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 virtualmachinemanagerget-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 -UseVMCountMaximumSet-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

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like