Delete SharePoint site subsite permanently

Delete SharePoint site subsite on premise environment is a common task for administrator. You might be thinking how to permanently delete a SharePoint site collection in production server. There are difference scenarios, you might face while trying to delete a site SharePoint. After sharepoint site migration, we need to delete old site, exactly where its helpful, as per current situation.

Advertisements

Permanently delete a subsite in SharePoint from site settings

You can follow UI method for sharepoint subsite deletion following step by step procedure below.

  • Navigate to sharepoint subsite.
  • Open site settings.
  • Click on Delete this site present under Site Actions.
Delete SharePoint subsite from site settings
Advertisements
  • Click on Delete option present at bottom right.
  • Pop up will appear for confirmation.
  • Click on OK to delete.
delete this site in site settings
Advertisements

Permanently delete a site in SharePoint from site settings

Follow the same procedure to delete site collection as well. Navigate to site collection settings and click on delete this site. After that click on delete and OK to apply the change.

Same steps are also applicable to delete sharepoint online site in office 365.

Advertisements

Delete a Site Collection from Central Admin

You can follow another way to delete site collection from central admin without navigating to site settings.

  • Navigate to central admin
  • Click on Application Management.
  • Click on Delete a site collection present under option Site Collections.
delete a site collection in sharepoint from central admin
Advertisements
  • Select site collection from any one web application, from the drop down, that you want to delete and click on Delete.
  • Click on OK for confirmation to apply changes.
delete site collection
Advertisements

Delete SharePoint site collection powershell

Follow Remove-SPSite, the powershell command to delete site collection in SharePoint.

Remove-SPSite -Identity "<Site Collection Url>" -GradualDelete -Confirm:$False
Remove-SPSite -Identity "http://win-q2repghf9du:44179/sites/SharePointTech" -GradualDelete -Confirm:$False
Remove-SPSite
Advertisements

Delete SharePoint subsite powershell

If you need to delete SharePoint subsite using powershell command, follow Remove-SPWeb.

Remove-SPWeb -Identity "<Subsite Url>"
Remove-SPWeb -Identity "http://win-q2repghf9du:44179/sites/SharePointTechnicalSupport/Subsite1/"
Remove-SPWeb
Advertisements

Delete all site collections present under web application

If you want to delete all site collections present under one web application, follow the command below.

$WebApplicationURL="http://win-q2repghf9du:24072/"
Get-SPWebApplication $WebApplicationURL | Get-SPSite -Limit ALL | Remove-SPSite -Confirm:$false
Delete all site collections present under web application
Advertisements

Delete all site collections present under specific managed path

Specific requirement might come when user need to delete all site collections part of one specific sharepoint managed path, in a web application, using powershell.

Get-SPSite "<web application url>/<managed path>*" -Limit ALL | Remove-SPSite -Confirm:$false
Get-SPSite "http://win-q2repghf9du:27315/sites*" -Limit ALL | Remove-SPSite -Confirm:$false
Delete all site collections present under specific managed path
Advertisements
Advertisements

Similar Article

Advertisements

Nintex feature id in SharePoint

Nintex feature id error messages in SharePoint related to nintex workflow features, you may face. Similar to SharePoint feature id, you need the nintex feature id to get understand the error more.

Nintex FeatureNintex Feature ID
NintexFormsAdminWeb70f4f7da-4fb4-4e30-ba1a-a733efb2e1ac
NintexFormsFarmada0910e-a663-4db4-a19c-d8a097317b87
NintexFormsListSite202afc3c-7384-4700-978d-6da3d3cce192
NintexFormsLiveSite23fce797-ac15-4451-b8da-cf8ac6de6912
NintexFormsSitePrerequisites716f0ee9-e2b0-41f0-a73c-47ed73f135de
NintexFormsWebApplication0cdf436f-61b0-43d2-b250-4360f0353b63
NintexFormsWorkflowSiteac8addc7-7252-4136-8dcb-9887a277ae2c
NintexLiveAdminLinks29e9a673-31a4-46a3-b0d2-d8e1db1dbd92
NintexWorkflow0561d315-d5db-4736-929e-26da142812c5
NintexWorkflowAdminf7937973-0cf9-4f2d-a549-be2d3c25b772
NintexWorkflowClaimsMigration4db97f4c-e643-4b1b-9f6a-43a9d817e6a2
NintexWorkflowContentTypeUpgrade86c83d16-605d-41b4-bfdd-c75947899ac7
NintexWorkflowEnterpriseAdminaa61ef91-ee2b-42d5-9911-7c6557ad90c2
NintexWorkflowEnterpriseWeb2fb9d5df-2fb5-403d-b155-535c256be1dc
NintexWorkflowEnterpriseWebParts53164b55-e60f-4bed-b582-a87da32b92f1
NintexWorkflowInfoPath80bf3218-7353-11df-af9f-058bdfd72085
NintexWorkflowLiveAdminWeb485f5158-4b8a-453f-9eeb-7b33f5112adf
NintexWorkflowLiveSite54668547-c03f-4bb5-aaab-d9568ebaf9c9
NintexWorkflowWeb9bf7bf98-5660-498a-9399-bc656a61ed5d
NintexWorkflowWebPartseb657559-be37-4b91-a369-1c201183c779
Advertisements

Nintex Content Types ID

Below are the ID of nintex content types. Like nintex feature id, nintex content types id are import for resolving any issue in SharePoint.

Nintex Content TypeContent Type ID
Nintex Biztalk Task0x010801005CC0A86910A24687A76ECAC954D3E3F3
Nintex Workflow Multi Outcome Task0x0108010064E42B14ADA442C78E98D686760A8493
Nintex Workflow Multi Outcome Task using InfoPath0x0108010064E42B14ADA442C78E98D686760A8493006EBD0FA4731041D9804386A7FEA568DC
Nintex Workflow Multi Outcome Task using Nintex Forms0x0108010064E42B14ADA442C78E98D686760A8493000568DBB766D0491684897A230753AAF9
Nintex Workflow Task0x0108010079DBDE612F7B46928C6A2516BA2CAE37
Nintex Workflow Task using InfoPath0x0108010079DBDE612F7B46928C6A2516BA2CAE3700E0B65C5281234030AA8CA4D8F8910E72
Nintex Workflow Task using Nintex Forms0x0108010079DBDE612F7B46928C6A2516BA2CAE3700D4A837248A47E040ABD1A569613E898B
Workflow0x01010024055591300C45C3B4C2854A24EF05CE
Workflow Snippet0x010100F815D979DC2B4F48A9DBCA64AED3C636
Workflow Template0x010100F8376F5313D041EF85718B229F4FBFA8
Advertisements

Nintex Fields Site Columns ID

Below are the ID of nintex fields.

Nintex Fields Internal NameIDGroup
NFLiveAuthorce8c2faf-1a10-4e3a-be01-8b2e954f2d62Nintex
NFLiveEditor8866de2b-711d-4c36-812f-68c2fb9593e5Nintex
ApproverComments819e6cf2-36c3-4013-8aef-c99712c26036Nintex Workflow
AssociatedContentType4a07d815-9c92-4b43-a527-29c3b76a65bfNintex Workflow
NintexWorkflowDescriptiond97c0a58-77fd-48cf-8a7a-9ffdfdd11a6eNintex Workflow
TemplateCategory6abeaa08-87c5-4385-9c81-39cbb72f99a6Nintex Workflow
TemplateLcid837c2b97-e338-446d-a993-c96fd0c4b5d7Nintex Workflow
WorkflowCategoryd0d7bbf9-95cb-4661-b7a0-9bec8e968c3eNintex Workflow
WorkflowPartDescription607ec2f6-48eb-4a14-9e1e-bc48043e157eNintex Workflow
WorkflowPartID7f3814a0-6ef1-4856-bf1d-1a06f8437dc4Nintex Workflow
ApprovalOutcome6765859b-8902-469f-a8b6-faa121304602NintexHidden
ApproverTaskID9cf1474e-c190-4d8d-ad6e-e26cbcbd587bNintexHidden
AssociatedListIDca9e1feb-0014-46b0-87c8-08fb9e2fe003NintexHidden
DatabaseID1e39a08d-5f96-494b-ad5a-9096a323b1daNintexHidden
Decisiona7ae99d0-e5df-47f4-9d75-560e3f608006NintexHidden
HumanWorkflowIDcaba3010-7526-43c2-b05f-786037b1dcdfNintexHidden
MultiOutcomeTaskInfof9c2546c-f40b-46d5-8bac-9ab11cc7d640NintexHidden
NintexWorkflowIDbb2af572-4d2c-4780-9bb9-a7cd8106e874NintexHidden
NWAssociatedWebID1d5afadd-d013-4d88-b3b2-38b570da9b6fNintexHidden
WaitingMessageIdcaca9759-3b72-4bf1-8927-7e101337ecf1NintexHidden
Xsdcb2eae1e-cab5-44dc-a9dc-84641eb2ada6NintexHidden
MessageDatabe604058-3251-4088-aad6-e702c4ff1905NintexHidden
Advertisements
Advertisements

move site collection to dedicate content database

We have to move site collection to dedicate content database when content database size growing too large. One content database present under a web application in SharePoint contains multiple site collections. We can create or add new content databases under web application when limit of maximum number of sites that can be created in this database exceed while creating new site collection. If one site collection present under a content database is growing large, user request to create a dedicate content database and move that particular site collection to another new content database. We need to follow the steps as described below to move site collection to dedicate content database.

Advertisements
  1. Get site collection GUID using powershell
  2. Get which content database site collection web application is stored
  3. Create new content database in SharePoint
  4. move site collection to different content database
  5. IISRESET SharePoint server
  6. Post Implementation testing
Advertisements

Get site collection GUID using powershell

Before you move site collection to another content database, get guid of sharepoint site. You can get site collection guid using powershell script as mentioned below.

$site=Get-SPSite http://win-q2repghf9du/sites/TeamSiteClassicRenamed
$siteguid=$site.id
echo $siteguid
get site collection guid powershell
Advertisements

Get which content database site collection web application is stored

Get site collection content database details including web application, site url using the powershell command below.

Get-SPSite | Where-Object {$_.Url -like "http://win-q2repghf9du/sites/TeamSiteClassicRenamed"} | select Url, ContentDatabase, WebApplication
content database in which site collection is stored

You can use the alternative command as described in my old post link below.

https://atomic-temporary-119393429.wpcomstaging.com/content-database-in-sharepoint/
Advertisements
Advertisements

Create new content database in SharePoint

I described in detail about how to create or add a new content database in SharePoint in my previous post. Follow the post linked below for more details and use the powershell script for creating content database.

https://sharepointtechnicalsupport.com/create-add-a-content-database-in-sharepoint-2019/
New-SPContentDatabase "WSS_Content_DB2" -DatabaseServer "WIN-Q2REPGHF9DU" -WebApplication http://win-q2repghf9du/ -MaxSiteCount 1 -WarningSiteCount 0
Create new content database in sharepoint using powershell
Advertisements
Advertisements
Content database in sql server
Advertisements

move site collection to different content database

Now we are ready to move site collections between databases using the powershell command Move-SPSite as described below.

Move-SPSite "http://win-q2repghf9du/sites/TeamSiteClassicRenamed" -DestinationDatabase "WSS_Content_DB2"
move site collection to dedicate content database
Advertisements
Advertisements

IISRESET SharePoint server

You will get a message in powershell window like “IIS must be restarted before this change will take effect. To restart IIS, open a command prompt window and type iisreset”. You have to do IIS reset SharePoint server.

iisreset
iisreset sharepoint server
Advertisements
Advertisements

Post Implementation testing

After move site collection to new content database completed, you can check GUID of the site collection again. Its same as source location.

check guid of site in sharepoint

check content database of site collection to cross check the new content database as destination location.

check content database of site collection
Advertisements
Advertisements
Advertisements
Advertisements