Follow Us:
I wanted to share this quick tip with PowerShell. Many times, we need to have an easy way to find the configuration database, and like a good SharePoint administrator, you want to try and use PowerShell. I have come across other blogs here and others that mention finding this with the registry, so this is just another way to do it.
There are many commands that deal with databases, but only one that gives us what we need - Get-SPDatabase. This cmdlet will show all different types of databases including configuration, content, and service application databases for the farm. Knowing this, we’re already halfway there. By default, this cmdlet spits out the Name, ID, and Type of the databases in the farm.
Knowing the type, we can use filtering to get exactly what we need. Run this command:
Get-SPDatabase | Where-Object { $_.TypeName -eq "Configuration Database" }
This limits the output and only gives us what we’re looking for, the configuration database. That was easy! To see all the valid types of databases for your farm, you can run the following:
Get-SPDatabase | select TypeName –unique
If we didn’t have the –unique switch, you would list duplicate entries for databases where you had multiples of, like Content Database. If you want to dig into the content databases, you can use Get-SPContentDatabase. Here’s a list of all the cmdlets for SharePoint databases. Enjoy!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.