SharePoint - Another Way to Delete Site Collection
|
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
SharePoint - Another Way to Delete Site Collection的更多相关文章
- SharePoint 2010/SharePoint 2013 Custom Action: 基于Site Collection 滚动文字的通知.
应用场景: 有时候我们的站点需要在每个页面实现滚动文字的通知,怎么在不修改Master Page的情况下实现这个功能?我们可以使用Javascript 和 Custom Action 来实现. 创建一 ...
- 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 ...
- 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 ...
- SharePoint 2013 创建 Site Collection
在之前的文章中,通过SharePoint Central Administration 创建了Web Application.在这篇文章中将继续SharePoint 2013之旅——还是以Step B ...
- SharePoint自动化系列——通过PowerShell创建SharePoint Site Collection
通过PowerShell创建SharePoint Site Collection,代码如下: Add-PSSnapin microsoft.sharepoint.powershell function ...
- How To Create SharePoint 2010 Site Collection In Its Own DB
在SharePoint 2010中可以使用Management Shell 为新建的Site Collection 创建自己的DB. 在 Shell中执行如下命令: 1. $w = get-spweb ...
- SharePoint 2013 代码实现自定义的站点模版创建Site Collection
先需要将自定义的站点模版从网站集转移到Farm中. 找一个自己已经完成配置及设计的网站,在网站设置里面选择另存为模版.要注意的是不是所有的站点类型都有另存为模版的功能. 存完之后可在解决方案库的界面里 ...
- SharePoint 2013 - Host-named Site Collection
1. 详细操作可参考此文章 的 Deployment and configuration for host-named site collections区域,简单来说,需要以下三行PowerShell ...
- backup site collection
http://stackoverflow.com/questions/5376380/sharepoint-2010-change-sitecollection-urlstsadm -o backup ...
随机推荐
- 我得新博客上线了采用Vue+Layui的结合开发,后台采用asp.net mvc
地址:www.zswblog.xyz 写完这个博客项目我真的很开心! 希望博客园的大佬们能去看看,如果可以希望帮我在Layui的年度案例点一个赞,谢谢! 地址:https://fly.layui.co ...
- IDEA 部署spring Cloud
Spring cloud Eureka Eureka Server,注册中心 Eureka Client,所有要进行注册的微服务通过Eureka Client 连接到 Eureka Server ,完 ...
- vue中通过hls.js播放m3u8格式的视频
近期做了一个功能,是接入一个海康的摄像头的监控视频,怎么获取m3u8的视频这里就不在叙述了,只说一下怎么将m3u8格式的视频成功播放 一.m3u8和HLS介绍 1.M3U8文件是指UTF-8编码格式的 ...
- android studio学习----添加项目库
Library Project(库项目) compile project(':library') 引用名称为 library 的 module .需要注意的是,被引用的 module 需要在 {@pr ...
- Get SAP Code Page by External Name
CL_ABAP_CODEPAGE - SAP_CODEPAGE 取SAP对应code page内码:
- SwitchGame---MybatisPLus
//实体类package com.example.spring.entity; import cn.afterturn.easypoi.excel.annotation.Excel;import cn ...
- 部署LNMP应用平台
一.LNMP应用平台概述 1.概述:LNMP代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构.Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/ ...
- 【GPU加速系列】PyCUDA(一):上手简单操作
PyCUDA 可以通过 Python 访问 NVIDIA 的 CUDA 并行计算 API. 具体介绍和安装可以参考 PyCUDA 官网文档和 pycuda PyPI. 本文涵盖的内容有: 通过 PyC ...
- Consul 知识点
平时开发时,一般使用consul dev模式,开发模式下kv存储不会持久化存储,全在内存中(重启consul就丢了!),所以一般建议yml配置文件内容,在项目中单独存一个文件,启动调试时,直接把配置文 ...
- mybatis框架-使用resultMap实现高级结果映射,collection属性的使用
需求:获取指定用户的用户信息和地址列表 修改user实体类 添加集合的引用. /** * 根绝用户id,获取该角色下的地址信息 * @param userID * @return */ public ...