I have a script updating users -QutaTemplate
when the default quota is changed.
But the problem is that it's also updating users who have individual quotas set. How can I get the name of the QuotaTemplate
that is used on each user in the foreach
loop, to skip those?
This is my current script:
$webApp = Get-SPWebApplication http://xxx.xxx.xxx
foreach($site in $webApp.Sites) {
# Skip the root url
if($site.Url -eq "http://xxx.xxx.xxx") {
continue
}
Write-Host $site.Url
Set-SPSite -Identity $site.Url -QuotaTemplate “Quota Name”
$site.Dispose()
}