PowerShell Command to identify the quota size of all the site collections per web application

The below mentioned power shell command is used to get the quota size of all the site collections per web application .Now , its a known fact that there are couple of ways to do this , but this command is very simple and neat and gives the result as expected .I was able to find the Power shell command to get the list of all the site collections in a farm and its quota size in the internet ,but the problem with that is, its also going to display the “My sites” as well in the result and it might take a while consuming heavy server resource to pull all the results from the farm .This command below is specific to a single web application and you just need to specify the web application url which you need . Please try it for yourself…..If you’re into a situation where you need to pull up the quota size of all the site collections in a single a web application , then this is the right tool for that.

Syntax:

Get-SPSite -Limit All | Where-Object{$_.Webapplication.url –like “https://vig.sharepoint.com/”} | select url, @{label=”Size in MB”;Expression={$_.usage.storage/1MB}} | Sort-Object -Descending -Property “Size in MB” | Format-Table –AutoSize

Detailed Description: 

The above mentioned PowerShell Command is used to identify the quota size of all the site collections per web application in SharePoint and will display the size in Megabytes.

Parameters to specify in the Command:

  1. Web application url
  2. Limit All – Please include this if you want the command to display the list of all site collections in the web application, else you would be getting only few results.
Advertisements

One thought on “PowerShell Command to identify the quota size of all the site collections per web application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s