Create quota templates

Last year I was involved in a project where the goal was to migrate the users home directories from an old Windows 2003 server to a new Windows 2012 and going from no quotas to 30 different quotas. In the POC I created this script to setup the quota templates with warning messages and thresholds, and I am glad i did since the project changed the template size and the body in the email a couple of times.

#-------------------------------------------------------------
#NAME: CreateQuotaTemplate.ps1 
#AUTHOR: Viktor Lindström
#
#COMMENTS: Write the quotas that are to be created in the $G 
#variable, for exaple if you write 1,2,3 it creates templates
#with 1GB, 2GB and 3GB, if you write 1..24 it will create 24 
#templates etc etc... It also creates two thresholds with
#mail action to the user. 
#-------------------------------------------------------------
$GB = 1..24

foreach ($a in $gb) 
    {
#Create action
    $Action= New-FsrmAction Email -mailto "[Source File Owner Email]" -Subject "[Quota Threshold]% av kvotan i din hemkatalog är uppnådd." -Body "Hej Du har överskridit [Quota Threshold]% av kvotabegränsningen i din hemkatalog. Tilldelad kvot är [Quota Limit MB] MB, och för tillfället används [Quota Used MB] MB ([Quota Used Percent]% över gränsen)."
#Create thresholds
        $Threshold = New-FsrmQuotaThreshold -Percentage 80 -action $Action
        $Threshold2 = New-FsrmQuotaThreshold -Percentage 95 -action $Action
#Create quota, shage the two GB to MB if you what megabytes instead of gigabytes    
        $Namn = ("$a" + "GB")
            New-FsrmQuotaTemplate -name $Namn -size ([int64]($a) * [int64]1GB) -Threshold $Threshold,$Threshold2
            }