Updating or Deleting FSRMQuota

by BassieBas at 2013-03-07 01:50:59

Hey guys,

I am trying to Update the quota (limit and description) OR Delete the quota and then make a new one.

# Quota aanmaken
$Grootte = 1000
$quotasize = $Grootte * $Aantal
$quotalimit = 1024 * 1024 * $quotasize
$fqtm = New-Object -com Fsrm.FsrmQuotaManager
$quota = $fqtm.CreateQuota(“F:\Snelstartdata\Test”)
$quota.ApplyTemplate(“Serverxs hard quota”)
$quota.QuotaLimit = $quotalimit
$quota.Description = "$Bedrijfsnaam " + $Aantal + "x Snelstart basis + " + $quotasize + “MB”

The code above is to create a new quota, but i cannot find out howto Update that Quota.
I am using Powershell ISE on Windows Server 2008R2. I can do this on the new Powershell on Windows Server 2012, but not on 2008R2.

I hope that anyone can help me. In forward, many thanks!
by DonJ at 2013-03-07 08:04:14
So, this isn’t really a PowerShell question so much as it is a question about that COM object. The docs for that are at http://msdn.microsoft.com/en-us/library … 85%29.aspx. It looks like you have to do a GetQuota() to get the existing quota, delete it, and then re-apply it. There’s no discrete “update” method.