Wanted to get a quick quota report on SharePoint sites on their allocation vs used space metrics to find out underutilized sites.
Here is the PowerShell script to get SharePoint site quota report:
Note that the "Infinity" has occurred on sites with No quota assigned!
Here is the PowerShell script to get SharePoint site quota report:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue Get-SPSite | Select URL,` @{Name="Site Owner"; Expression={$_.Owner.Email}},` @{Name="Quota Assigned"; Expression={"{0:N2} MB" -f ($_.Quota.StorageMaximumLevel/1MB)} } ,` @{Name="Storage Used"; Expression={"{0:N2} MB" -f ($_.Usage.Storage/1MB)}},` @{Name="Percentage Used"; Expression={"{0:P2}" -f ( ($_.Usage.Storage/1MB) / ($_.Quota.StorageMaximumLevel/1MB ))}}` | Out-GridView -Title " Quota Report"Report Output:
Note that the "Infinity" has occurred on sites with No quota assigned!