SharePoint - Another Way to Delete Site Collection
2019-06-05 13:19 努力学习的小熊 阅读(463) 评论(0) 编辑 收藏 举报
I had created a site collection. But there is a problem of web-frontend server (I did not know when I created the site), so the page is always in processing. After waiting 40 mins, I closed the page. When the problem of web-frontend server solved, I found the site link already existed, but I cannot connect to site and I cannot delete it in Central Administration. Try to delete site collection in Application Management, failed Use PowerShell to delete site collection, failed Nothing change |
The Central Administration displayed the site in the sites list, but without any reference to the Content Database where it should have been created. No way to remove it using the web interface (all pages displaying information about the site had no content at all).
Then i thought to clean it up and remove via script.
A simple Get-SPSite returned a valid object. But a subsequent Remove-SPSite failed with the dreaded “Unknown SPRequest error.occurred”.
I had to find a quick solution, like a “force delete” when the site cannot be deleted.
Therefore I used a not so well-known operation on the Content Database object: Microsoft.SharePoint.Administration.SPContentDatabase::ForceDeleteSite (see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spcontentdatabase.forcedeletesite.aspx).
With this simple PowerShell code I managed to work it out and clean the unwanted or corrupted site.
$site = Get-SPSite http://siteurl $siteId = $site.Id $siteDatabase = $site.ContentDatabase $siteDatabase.ForceDeleteSite($siteId, $false, $false)
As the Information clearly states in the image As the Information clearly states in the image
Reference: https://sharepoint.stackexchange.com/questions/133131/cannot-delete-site-collection-in-central-administration
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2009-06-05 SharePoint 2007在仅有内容数据库的灾难性恢复
2009-06-05 SharePoint 错误0x80040E14解决(续)
2006-06-05 使用配制文件定制身份验证和基于角色的安全