Create a New Content Database

Scenario/Problem: You want to create a new content database and associate it to an existing web application.

Solution: Use the New-SPContentDatabase

The New-SPContentDatabase cmdlet enables you to create a new content database using the Name parameter for the name and using the WebApplication parameter to associate it to the specified web application. Because you can use the name of the web application, you do not need to obtain the actual identity. Listing 7.3 shows a sample command-line entry.

Listing 7.3. Creating a New Content Database Example

New-SPContentDatabase -Name NewContentDB -WebApplication "PSWebApp"

Creating the new content database takes a moment. An output of the content database information ...

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.