Skip Ribbon Commands
Skip to main content

SharePoint Lover


SharePoint Lover > Posts > Regular Used PowerShell Commands
June 14
Regular Used PowerShell Commands

​Assuming User is Logged in with the SharePoint Farm Account, using SharePoint Management Shell.

1.Get the size of a content databases in SharePoint Web Application

​Get-SPContentDatabase -WebApplication "http://yourwebapplication" | Format-Table Name, @{Label="Size"; Expression={$_.DiskSizeRequired / 1073741824}}


2. Get the size and details of all content databases on a farm

Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}}

Create Get-SPDatabase.jpg

3. Get the size of each Site Collection in a Web Application

Get-SPWebApplication http://yourwebapplication  | Get-SPSite -limit all | select url, @{label="Size in MB";Expression={$}} | Sort-Object -Descending -Property "Size in MB" | Format-Table –AutoSize

Create Get-SPWebApplication.jpg

4.Get the size of alls Site Collection on a Farm

Get-SPSite -Limit All | select url, @{label="Size in MB";Expression={$}}



There are no comments for this post.