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. 一个类搞定SQL条件映射解析,实现轻量简单实用ORM功能

    个人觉得轻简级的ORM既要支持强类型编码,又要有执行效率,还要通俗易懂给开发者友好提示,结合Expression可轻松定制自己所需要功能. Orm成品开源项目地址https://github.com/ ...

  2. K8S CoreDNS部署失败,发现的一个问题

    K8S CoreDNS部署失败,查看错误日志,提示如下 root >> kubectl get all --all-namespaces -o wide root >> kub ...

  3. Go 笔记之如何防止 goroutine 泄露

    今天来简单谈谈,Go 如何防止 goroutine 泄露. 概述 Go 的并发模型与其他语言不同,虽说它简化了并发程序的开发难度,但如果不了解使用方法,常常会遇到 goroutine 泄露的问题.虽然 ...

  4. 3-awk

    1.输出双引号:awk '{print "\""}'        #放大:awk '{print "  \"  "}'使用“”双引号把一个 ...

  5. javascript 函数表达和闭包

    函数表达式和闭包 针对JS高级程序设计这本书,主要是理解概念,大部分要点源自书内.写这个主要是当个笔记加总结 存在的问题请大家多多指正! 定义函数的两种方法 函数声明: function functi ...

  6. Using hints for Postgresql

    本文转自:http://pghintplan.osdn.jp/pg_hint_plan.html pg_hint_plan 1.1 pg_hint_plan Name Synopsis Descrip ...

  7. HTML5-表单 自带验证

    表单语法<form method="post"(规定如何发送表单数据 常用值:get|post) action="result.html">(表示向 ...

  8. 国内不fq安装K8S三: 使用helm安装kubernet-dashboard

    目录 3 使用helm安装kubernet-dashboard 3.1 Helm的安装 3.2 使用Helm部署Nginx Ingress 3.3 使用Helm部署dashboard 3.4 使用He ...

  9. Linux shell awk中printf使用

    printf 是 awk 的重要格式化输出命令 printf格式化输出内容 格式:     printf format,item1,item2...     要点: 1,printf输出时要指定格式f ...

  10. 工作必备之正则匹配、grep、sed、awk

    常用正则:匹配空行:^\s*\n 匹配www开头:^www 添加行号:awk '$0=""NR". "$0' /etc/yum.conf 1.所有域名前加www ...