$wa = $get-spwebapplication "my site host url"$wa.Sites | foreach-object { if ( $_.Url.StartsWith("my site host url/personal") ) { Set-SPSite -Identity $_.Url -QuotaTemplate "Personal Site" }}