August 15, 2016 at 6:36 pm #50499
I'm trying to set a new quota (or re-set existing) and the set-fsrmquota doesn't appear to support the -action param like set-fsrmquotatemplate. All my quotas are custom and do not use a template. My understanding was that if you create a quota of a template and then change the template, the quotas created off that template would change also. Is that a misconception on my part? If so, I may have my workaround by creating a temporary template, create quota based on the template, then delete the template.
If not, can anyone suggest a workaround?
here's basically what I'm tyring to do: (btw, I use the description field to hold emails of quota contact personnel that are not necessarily the same as who receives the quota notification messages. I also change the default notification email from [Admin] to specific email addresses that are not specified anywhere else )
$action= New-FsrmAction set-fsEmail -mailto $quotanotify -Subject "[Quota Threshold]% quota threshold exceeded." -Body "User [Source Io Owner] has exceeded the [Quota Threshold]% quota threshold for the quota on [Quota Path] on server [Server]. The quota limit is [Quota Limit MB] MB, and [Quota Used MB] MB currently is in use ([Quota Used Percent]% of limit)." $threshold = New-FSRMquotathreshold -percentage 95 Set-FsrmQuota -cimsession $server -path $sharepath -size $quota -Description $quotanotify -threshold $threshold -Action $action
- This topic was modified 3 months, 3 weeks ago by Eric Gustafson. Reason: change blockquote to pre
August 16, 2016 at 5:24 pm #50631
Your understanding is correct. You have three options after editing a template, you can do nothing to existing quotas and just have all new quotas match the template; you can update all existing quotas that were derived from the template, including those that have been modified; or you can update existing quotas that match the original template, leaving modified quotas untouched.
The PowerShell parameters for Set-FsrmQuotaTemplate that control the behaviour are UpdateDerived and UpdateDerivedMatching.
- This reply was modified 3 months, 3 weeks ago by Matt Bloomfield.
August 17, 2016 at 11:40 pm #50900
ok, with that in mind here's an update that works.:
$action= New-FsrmAction Email -MailCC "[Source Io Owner Email]" -mailto $quotanotify -Subject "[Quota Threshold]% quota threshold exceeded." -Body "User [Source Io Owner] has exceeded the [Quota Threshold]% quota threshold for the quota on [Quota Path] on server [Server]. The quota limit is [Quota Limit MB] MB, and [Quota Used MB] MB currently is in use ([Quota Used Percent]% of limit)." -CimSession $server $threshold = New-FSRMquotathreshold -percentage 95 -CimSession $server -action $action New-FsrmQuotaTemplate -cimsession $server -size $quota -name "STANDARD" -Threshold $Threshold New-FsrmQuota -cimsession $server -path $sharepath -size $quota -Description $quotanotify -template "STANDARD" Remove-FsrmQuotaTemplate -Name "STANDARD" -CimSession $server -force
Is there a way to check the checkbox for 'send e-mail to the user who exceeded the threshold' option that's viewable/available in the fsrm gui? It's currently getting added in the additional e-mail headers section which I'd prefer not to use.
You must be logged in to reply to this topic.