Display All Content Databases for a Web Application

Scenario/Problem: You want to see all content databases associated to a specific web application.

Solution: Use the Get-SPContentDatabase cmdlet with the WebApplication parameter.

The Get-SPContentDatabase cmdlet has several parameter sets. One set enables a WebApplication parameter to be used. Using the WebApplication parameter with the Get-SPContentDatabase cmdlet (see Listing 7.4) displays information about all content databases associated to the specified web application, as shown in Figure 7.3.

Listing 7.4. Displaying All Content Databases

Get-SPContentDatabase -WebApplication "PSWebApp"

Figure 7.3. Results of using the Get-SPContentDatabase cmdlet with the WebApplication parameter. ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.