Skip to content

Instantly share code, notes, and snippets.

@ciphertxt
Created October 26, 2015 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ciphertxt/6d1790bb26c26632990a to your computer and use it in GitHub Desktop.
Save ciphertxt/6d1790bb26c26632990a to your computer and use it in GitHub Desktop.
Gets the sizes and required storage of existing SharePoint databases. From http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=193
Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))} | Out-File c:\temp\spdatabasesizes.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment