Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

How to Remove Content Database in SharePoint using PowerShell

$
0
0
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 databasefrom SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.
Syntax:
Get-SPContentDatabase -Identity "ContentDB-Name" | Remove-SPContentDatabase

E.g.
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:

Viewing all articles
Browse latest Browse all 1058

Trending Articles