Thursday, November 26, 2015

How to Remove Content Database in SharePoint using PowerShell

SharePoint content databases are the most important artifacts in SharePoint platform as they hold majority of the data. However, at times we may have to delete the content database from SharePoint. Here is how you can utilize PowerShell to delete database:

SharePoint 2010: Remove content database using PowerShell
To delete content database from SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.

Get-SPContentDatabase -Identity "ContentDB-Name" | Remove-SPContentDatabase

Get-SPContentDatabase -Identity "SP10_Intranet_Content02" | Remove-SPContentDatabase
sharepoint powershell delete content database
This deletes SharePoint Content database from SharePoint as well as from SQL Server permanently! As stated, use: Dismount-SPContentDatabase cmdlet if you want to remove the database from SharePoint alone!

Related Posts:

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

1 comment :

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...