Search This Blog

Friday, May 1, 2015

Powershell to list Content Database details for SharePoint Site Collection

Get the Content Database details for SharePoint Site Collection

Get-SPContentDatabase -Site 'http://sharepointsitecollectionurl/'


Id               : xxx1404-b716-xxxx-ba76-9746xxxx                                                                  
Name             : xxx                                                                                                       
WebApplication   : xxx                                                                                                                
Server           :           xxx                                                                                                       CurrentSiteCount : 1

Powershell to list all SharePoint Site Collections and subsites a web application

Get list of SharePoint Site Collections and SubSites

Get-SPSite 'http://sharepointwebapplicationurl/' | Get-SPWeb -Limit All

Powershell to list all SharePoint Site Collections in a web application

Get list of SharePoint Site Collections

Get-SPSite  -Limit All

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

Powershell to list all SharePoint Content Databases in the SharePoint Farm

Get list of all SharePoint Content Databases in the SharePoint Farm

Get-SPContentDatabase

Powershell to list all SharePoint Databases in the SharePoint Farm

Get list of SharePoint Databases in the SharePoint Farm

Get-SPDatabase
Propellerads