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
I select my site collection in Central Administration. For example, if I navigate to Application Management > View all site collections> selecte site collection, there is no information on the right side. No database, no adminitrator, nothing.

Use PowerShell to delete site collection, failed
Remove-SPSite -Identity http://domain/sites/sitename"

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

SharePoint - Another Way to Delete Site Collection的更多相关文章

  1. SharePoint 2010/SharePoint 2013 Custom Action: 基于Site Collection 滚动文字的通知.

    应用场景: 有时候我们的站点需要在每个页面实现滚动文字的通知,怎么在不修改Master Page的情况下实现这个功能?我们可以使用Javascript 和 Custom Action 来实现. 创建一 ...

  2. SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script

    In this post I will introduce a way how to run a script for backing up SharePoint data which could b ...

  3. An unexpected error has occurred" error appears when you try to create a SharePoint Enterprise Search Center on a Site Collection

    The Enterprise Search Center requires that the Publishing feature be enabled. To enable the Publishi ...

  4. SharePoint 2013 创建 Site Collection

    在之前的文章中,通过SharePoint Central Administration 创建了Web Application.在这篇文章中将继续SharePoint 2013之旅——还是以Step B ...

  5. SharePoint自动化系列——通过PowerShell创建SharePoint Site Collection

    通过PowerShell创建SharePoint Site Collection,代码如下: Add-PSSnapin microsoft.sharepoint.powershell function ...

  6. How To Create SharePoint 2010 Site Collection In Its Own DB

    在SharePoint 2010中可以使用Management Shell 为新建的Site Collection 创建自己的DB. 在 Shell中执行如下命令: 1. $w = get-spweb ...

  7. SharePoint 2013 代码实现自定义的站点模版创建Site Collection

    先需要将自定义的站点模版从网站集转移到Farm中. 找一个自己已经完成配置及设计的网站,在网站设置里面选择另存为模版.要注意的是不是所有的站点类型都有另存为模版的功能. 存完之后可在解决方案库的界面里 ...

  8. SharePoint 2013 - Host-named Site Collection

    1. 详细操作可参考此文章 的 Deployment and configuration for host-named site collections区域,简单来说,需要以下三行PowerShell ...

  9. backup site collection

    http://stackoverflow.com/questions/5376380/sharepoint-2010-change-sitecollection-urlstsadm -o backup ...

随机推荐

  1. FileChannel(API详解)

    1.两种获取通道的方法FileChannel.open()的方式 FileChannel channell = FileChannel.open(Paths.get("a.txt" ...

  2. Oracle基础语法 一

    表空间操作 1.创建一个表空间 create tablespace emp(空间名) datafile 'emp.dbf' size 10M autoextend on ;   →表空间名字 /  物 ...

  3. C# 与 Java 的一些差异

    如果你是 Java 开发人员,则可以在 Xamarin 平台上充分利用你的技能和现有代码,同时获得 C# 的代码重用优势.你会发现 C# 语法与 Java 语法非常相似,这两种语言提供非常类似的功能. ...

  4. 调试 Go 的代码生成

    原文:https://studygolang.com/articles/19815 这是一个创建于 2019-04-17 23:12:26 的文章,其中的信息可能已经有所发展或是发生改变. 2016 ...

  5. 【转载】c# datatable 判断值是否存在

    在C#的数据表格DataTable操作过程中,有时候在操作DataTable前需要判断DataTable中的值是否存在,此时首选需要判断DataTable是否为null值,而后在判断DataTable ...

  6. ES6 变量与解构(二)

    一.变量的声明与使用 [测试示例需要在node环境中测试,浏览器环境下并不完全兼容ES6代码]ES6中可以使用 {} 来包含任意一段代码,被 {} 包裹的内容称为一个代码块(局部作用域) let关键字 ...

  7. MYSQL的修改表结构SQL语句

    更多java学习资料>>> 1.背景 使用sql语句对表结构进行修改 2.案例演示 案例:表结构 CREATE TABLE `login_user` ( `id` ) NOT NUL ...

  8. Spring Security :CsrfFilter过滤器

    spring security框架提供的默认登录页面,会有一个name属性值为_csrf的隐藏域: 这是框架在用户访问登录页面之前就生成的,保存在内存中,当用户提交表单的时候会跟着一起提交: 然后会经 ...

  9. springmvc配置访问静态文件

    xmlns:mvc="http://www.springframework.org/schema/mvc" <mvc:annotation-driven /><m ...

  10. HDU5952 dfs+剪枝

    题目分析: 对于给出的n个点和m条边,求这个图的完全联通子图的数量(每次查询的子图的大小为s),对于本题而言,很容易想到的是dfs暴力和这个点相连的所有的点,并且判断这个图是否是度为s 的完全联通子图 ...