Hi!
Is it possible to alter quotas with powershell? I would need to set quotas automatically via script.
-
- Veteran
- Posts: 411
- Liked: 31 times
- Joined: Nov 21, 2014 10:05 pm
- Contact:
Powershell script to set quota for users
Bed?! Beds for sleepy people! Lets get a kebab and go to a disco!
MS MCSA, MCITP, MCTS, MCP
VMWare VCP5-DCV
Veeam VMCE
MS MCSA, MCITP, MCTS, MCP
VMWare VCP5-DCV
Veeam VMCE
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell script to set quota for users
Sure, it is.
Thanks.
Code: Select all
$Tenant = Get-VBRCloudTenant -Name "Name of user"
$Resources = $Tenant.Resources[0]
$NewQuota = Set-VBRCloudTenantResource -CloudTenantResource $Resources -Quota "New value in GB"
Set-VBRCloudTenant -CloudTenant $Tenant -Resources $NewQuota
-
- Veteran
- Posts: 411
- Liked: 31 times
- Joined: Nov 21, 2014 10:05 pm
- Contact:
Re: Powershell script to set quota for users
Thanks!
Bed?! Beds for sleepy people! Lets get a kebab and go to a disco!
MS MCSA, MCITP, MCTS, MCP
VMWare VCP5-DCV
Veeam VMCE
MS MCSA, MCITP, MCTS, MCP
VMWare VCP5-DCV
Veeam VMCE
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell script to set quota for users
You're welcome.
By the way, $Tenant.Resources returns array of quotas assigned to a given tenant. That's why I've used [0] to select the first quota.
If a tenant happens to have multiple quotas given to him, you should play with number in bracket to select the appropriate quota. (enumeration starts from zero, [0], [1], etc.)
Thanks.
By the way, $Tenant.Resources returns array of quotas assigned to a given tenant. That's why I've used [0] to select the first quota.
If a tenant happens to have multiple quotas given to him, you should play with number in bracket to select the appropriate quota. (enumeration starts from zero, [0], [1], etc.)
Thanks.
Who is online
Users browsing this forum: No registered users and 15 guests