Friday, May 1, 2015

Powershell to list all SharePoint databases and their sizes

Get list of SharePoint databases and their sizes

Get-SPDatabase | Sort-Object disksizerequired -desc | %{write-host  "Size: $($_.disksizerequired/1mb)MB - Database: $($_.Name)"}

The result will be listed down in the below format.

Size: 5237MB - Database: SharePoint_Config
Size: 3455MB - Database: UsageDB
Size: 2261MB - Database: SharePoint_AdminContent
Size: 204MB - Database: WebAnalyticsStagerDB
Size: 172MB - Database: Sync DB
Size: 155MB - Database: SearchDB_PropertyStore
.
.
.
.
.
Size: 6MB - Database: BusinessDataCatalogDB
Size: 3MB - Database: SecureStoreServiceAppDB
Size: 2MB - Database: StateServiceDB
Size: 2MB - Database: PerformancePointDB

No comments:

Post a Comment