Find content database name for site collection using PowerShell in SharePoint 2013/2016

This PowerShell SharePoint tutorial explains, how to find content database name for site collection using PowerShell in SharePoint 2013/2016.

We can easily know which content database one SharePoint site collection is using in SharePoint using PowerShell as well as from SharePoint central administration.

Find content database name for site collection using PowerShell in SharePoint

First, we will see how to find content database name for site collection from SharePoint 2013/2016 central administration.

Open SharePoint 2013/2016 central administration. Then click on Application Management.

Then under Site Collections, click on View all site collections.

In this page you can see the particular site collection and then in the right side you can see the content database name like below:

Find content database name for site collection using PowerShell

Using PowerShell also we can be able to know which content database one site collection is using in SharePoint 2013/2016.

You can execute the below PowerShell code in Windows PowerShell ISE.

Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue

(Get-SPSite "http://mypc:29024/sites/HydTraining/").ContentDatabase.name
Find content database name for site collection using PowerShell in SharePoint

You may like following SharePoint content database tutorials:

This SharePoint tutorial, we discussed how to find content database name for site collection using PowerShell in SharePoint 2013/2016.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

  • […] In this azure tutorial, we will discuss how to fix the error, The term ‘New-AzResourceGroup’ is not recognized as the name of a cmdlet. which comes while trying to create a resource group using PowerShell in Azure. […]

  • […] In this azure tutorial, we will discuss how to fix the error, The ‘Set-AzContext’ command was found in the module ‘Az.Accounts’. which comes while trying to create an Azure SQL database using PowerShell in Azure. […]

  • […] In this azure tutorial, we will discuss how to fix the error, The ‘New-AzSqlServer’ command was found in the module ‘Az.Sql’, but the module could not be loaded. which comes while trying to create an Azure SQL database using PowerShell in Azure. […]

  • >