February 2013
Intermediate to advanced
304 pages
8h 26m
English
Scenario/Problem: You want to remove a content database from its web application and delete the actual SQL Server database and data.
Solution: Use the Remove-SPContentDatabase cmdlet with a database variable.
The Remove-SPContentDatabase cmdlet enables you to delete the specified content database. Use this in conjunction with the Get-SPContentDatabase cmdlet, as shown in Listing 7.7.
Listing 7.7. Sample Script for Removing a Content Database
$database = Get-SPContentDatabase-Identity 025b1239-cd62-451e-943d-dff2e0d52ec8Remove-SPContentDatabase $database
Tip
Instead of using the database variable, you can execute Remove-SPContentDatabase by just providing the name of the content database without any parameter entries ...
Read now
Unlock full access