search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Set User Role Quota for each Cloud Profile in SCVMM 2012 SP1 – Method 2
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 1,914 views | 12/08/2013 14:17

You can set User Role Quota for each Cloud Profile in SCVMM 2012 SP1.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$UserRoles = "BackOffice","CallCenter"
foreach ($UserRole in $UserRoles)
{
	$UserRole = Get-SCUserRole $UserRole
	$Clouds = "DMZ Cloud","Prod Cloud","Test Cloud"
	foreach ($Cloud in $Clouds)
	{
	   $MyCloud = Get-SCCloud $Cloud
	   $CloudUsage = Get-SCCloudUsage -Cloud $MyCloud -UserRole $UserRole
	   $CPUCount = $CloudUsage.CPUUsageCount
	   $Memory = $CloudUsage.MemoryUsageMB
	   $VMCount = $CloudUsage.VMUsageCount
	   [int]$NewCPUCount = [int]$CPUCount + 40;
	   [int]$NewMemory = [int]$Memory + 81920;
	   [int]$NewVMCount = [int]$VMCount + 10;
	   Get-SCUserRoleQuota -UserRole $UserRole -Cloud $MyCloud | Set-SCUserRoleQuota -CPUCount $NewCPUCount -MemoryMB $NewMemory -VMCount $NewVMCount
	}
}

That will set on all profiles on $UserRoles array.



Leave a Reply