Using PowerShell to determine SharePoint database size


Open the Sharepoint management shell

Then

Run the following command

To get list of databases

Get-SPDatabase

The following command to get list of every database used and its Size

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


To know how much total space is needed

Run the following

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + ” – ” + $_.disksizerequired/1024/1024} {Write-Host “`nTotal Storage (in MB) =” (“{0:n0}” -f ($db/1024/1024))}


Advertisements

How to find SharePoint List and Libraries true Size?


Go to the main page site settings

The go to Storage Metrics
under the

Site Collection Administration

Then check for the size of every site, library and list