Monday, March 27, 2023
HomePowershellHow one can Delete a SharePoint Website — LazyAdmin

How one can Delete a SharePoint Website — LazyAdmin

New SharePoint websites are simply created in Microsoft 365, however typically a bit too straightforward. I usually see quite a lot of unused SharePoint websites in SharePoint on-line. Customers unintentionally created two websites for a similar venture, or simply needed to check one thing out. So typically we might want to delete SharePoint websites to maintain our surroundings cleaned up.

It’s vital to examine if SharePoint websites aren’t used anymore earlier than we will delete them. And this may typically be a problem as a result of fashionable websites can look inactive, although the Groups chat is actively used.

On this article, we’re first going to try find out how to delete a SharePoint web site. And in a while, we are going to check out find out how to discover inactive websites.

What it is advisable know

Earlier than we check out find out how to delete a SharePoint web site, there are some things you want to bear in mind. To delete a web site you will have to be both a web site proprietor or a SharePoint administrator. If it’s a communication web site, then additionally, you will must have the location admin function.

Lately we’ve the traditional SharePoint websites (standalone websites) and fashionable websites. Trendy websites are Microsoft 365 Teams which have a Groups channel, SharePoint web site, OneNote, Planner, and so forth. Deleting the websites is for each virtually the identical, however remember the fact that with a contemporary web site, additionally Groups, OneNote, Planner, and so forth is deleted.


You’ll be able to configure alerts for when a SharePoint web site or Staff is deleted. I’ve seen sufficient circumstances the place Website Homeowners deleted the Staff and all of the SharePoint information was misplaced as effectively.

SharePoint websites or Microsoft 365 Teams which are deleted are retained for brief interval. This lets you restore all of the content material in case you unintentionally deleted the mistaken SharePoint web site. The retention interval is completely different for traditional websites and fashionable websites:

  • Traditional SharePoint web site: 93 days
  • Trendy SharePoint web site: 30 days

On the finish of the article, I can even clarify how one can restore a SharePoint web site or Microsoft 365 Group (Trendy web site).

Delete a SharePoint Websites

There are two places the place you’ll be able to delete a SharePoint web site, within the SharePoint Admin Heart in case you are a SharePoint administrator or within the web site settings when you find yourself Website Proprietor.

Deleting a Trendy SharePoint Website

Most SharePoint websites lately are fashionable websites. When you’re a web site proprietor, you’ll be able to delete the SharePoint web site utilizing the location settings:

  1. Open the SharePoint web site
  2. Click on on the gear icon (Settings)
  3. Select Website Data
Open Website Settings in SharePoint
  1. Click on on Delete Website. (In the event you don’t see that possibility, then double-check that you’re a web site proprietor)
  2. Thick Sure, delete this group and all its related sources
  3. Click on on Delete
Delete SharePoint Site
Delete SharePoint Website

Deleting a Traditional Website

To delete a traditional SharePoint web site we have to comply with nearly the steps. Solely the location settings look a bit completely different than with a contemporary web site. Once more, you will have to be a web site proprietor to have the ability to delete the location.

  1. Open the SharePoint web site
  2. Click on on the gear icon (Settings)
  3. Select Website Settings
Delete traditional SharePoint Website
  1. Click on on Delete this web site (underneath Website Actions)
  2. You’ll get a warning that you’re about to delete the location. Click on Delete after which Okay

Deleting a SharePoint web site as Administrator

When you’re a World or SharePoint Administrator, then you may as well delete the SharePoint websites from the SharePoint Admin Heart. You’ll be able to bulk delete a number of SharePoint websites or in fact particular person websites.

To delete a single SharePoint websites within the admin middle:

  1. Open the SharePoint Admin Heart
  2. Increase websites and select Lively Websites
  3. Click on or choose the location that you simply wish to delete
  4. Click on on Delete and once more on Delete to substantiate it
Delete site in the SharePoint Admin Center
Delete Website from the Admin Heart

It’s also possible to delete a number of websites from the SharePoint Admin Heart:

  1. Choose a number of websites that you simply wish to delete
  2. Click on on Bulk edit
  3. Select Delete and make sure your motion by clicking on Delete once more.
Bulk delete SharePoint sites
Bulk Delete SharePoint websites

Delete SharePoint Website with PowerShell

We are able to in fact additionally use PowerShell to delete a SharePoint web site. Just remember to have put in the SharePoint module earlier than you proceed. Websites which are deleted via PowerShell can even go to the recycle bin first, so you’ll be able to at all times restore them when wanted.

To delete a traditional SharePoint web site you need to use the cmdlets beneath. You will have to substantiate the delete motion after the Take away-SPOSite cmdlet:

# Connect with SharePoint On-line Companies
Join-SPOService -Url

# Take away the SharePoint Website
Take away-SPOSite -Id -NoWait

To delete a Trendy SharePoint web site we might want to use the Trade On-line module in PowerShell. First, hook up with Trade On-line after which delete the SharePoint web site with the Take away-UnifiedGroup cmdlet:

# Connect with Trade On-line
Join-ExchangeOnline -UserPrincipalName [email protected]

# Delete the SharePoint web site
Take away-UnifiedGroup -Id "Lab 11"

How one can Restore a SharePoint Website

What if you happen to unintentionally deleted the mistaken SharePoint web site or Microsoft 365 Group? As talked about at first, delete websites are stored for 30 as much as 93 days, relying on the SharePoint web site sort. So, until you empty the recycle bin, there may be an possibility to revive the SharePoint web site.


Just remember to have a good backup resolution in your Microsoft 365 atmosphere. This manner you’ll be able to at all times restore the info, even after the 93 days limitation.

We are able to restore a traditional or fashionable web site in the identical means in SharePoint On-line:

Restore a Deleted SharePoint web site

To revive a deleted SharePoint web site you will have to open the SharePoint Admin Heart. Right here we will view the deleted websites checklist and restore the location:

  1. Open the SharePoint Admin Heart
  2. Increase Websites and choose Deleted Websites
  3. Choose the location and click on on Restore
  4. You’ll get a notification that every one different sources additionally shall be restored, click on Restore to proceed
restore sharepoint site
restore SharePoint web site

Discovering Inactive SharePoint websites

Earlier than you delete a SharePoint web site it’s vital to examine if the location actually isn’t used anymore. Now the problem lately is that SharePoint websites may not have any file exercise for the final 90 days, however the Groups channel remains to be actively used.

So when not sure we have to examine for exercise on a minimum of two locations, SharePoint and Groups. Let’s begin with SharePoint. Within the SharePoint Admin Heart we will view the final exercise on the location, the variety of web page visits, and information on a web site. These three metrics provide you with a great indication if the location is used or not.

  1. Open the SharePoint Admin Heart
  2. Increase Websites > Lively websites
  3. Scroll a bit to the fitting to view the columns Final Exercise, Web page Visits, and Recordsdata


In the event you scroll all the way in which to the fitting, you’ll be able to click on on Customise Columns and reorder them

Check SharePoint site Activity
Examine SharePoint web site Exercise

In the event you click on on the Final Exercise column header, you may as well filter the checklist on Final Exercise. This provides you with the choice for instance to view solely the websites that by no means had exercise. An excellent place to begin when cleansing up.

find inactive sharepoint sites
discover inactive SharePoint websites

If you wish to examine the exercise of a single SharePoint web site, then simply click on on the SharePoint web site and open the Exercise tab. This provides you with all the knowledge you want concerning the web site.

Groups is a bit more durable to confirm, however we will examine the Groups utilization report within the Groups Admin Heart. If the group isn’t listed within the report then we all know that it’s an inactive group.

  1. Open the Groups Admin Heart
  2. Increase Analytics & Reviews and click on on Utilization Reviews
  3. Select the Groups utilization report and set the date vary to final 90 days
  4. Click on on Run Report
  5. Solely energetic Groups are listed within the report
list active teams

Completely Delete a SharePoint web site

If you delete a SharePoint Website it’ll stay within the recycle bin for a minimum of 30 days. More often than not this isn’t a difficulty. However what if you happen to unintentionally created a traditional SharePoint web site, whilst you needed to create a communication web site? You could have deleted the traditional web site, however as you might need observed, you’ll be able to’t reuse the location tackle.

To unravel this, we must completely delete the SharePoint web site. Consider, that you would be able to’t restore them anymore until you may have a third-party backup resolution.

  1. Open the SharePoint Admin Heart
  2. Increase websites and click on on Deleted websites
  3. Choose the deleted web site
  4. Click on on Completely delete
Permanently Delete SharePoint site

This selection is simply not attainable when it’s a contemporary SharePoint web site. To completely delete a contemporary SharePoint web site we might want to use PowerShell. Just remember to are related to the SharePoint On-line providers and that you recognize the complete URL to the SharePoint web site:

# Connect with SharePoint On-line Companies
Join-SPOService -Url

# Record all deleted SharePoint Websites

# Completely delete the SharePoint Website
Take away-SPODeletedSite -Id
Permanently Delete a SharePoint site with powershell

Wrapping Up

When deleting a SharePoint web site be sure that it isn’t used anymore. After all, you’ll be able to restore the location from the recycle bin, nevertheless it’s higher to forestall it. Use the built-in studies or confirm it with the location proprietor or one in every of its members.

Understand that web site homeowners can even delete SharePoint websites, so I wish to configure alerts in Microsoft 365 to detect unintended deletion in time.

I hope you discovered this text helpful, you probably have any questions or suggestions, simply drop a remark beneath.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments