Search This Blog

Tuesday, August 27, 2013

How to determine SharePoint database size? using Powershell

                                             
Using PowerShell to determine SharePoint database size?

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

Or

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

No comments:

Post a Comment