简体   繁体   English

以编程方式删除SharePoint 2010中的子网站

[英]Delete subsite in SharePoint 2010 programmatically

I have a requirement to delete subsite of a site collection of SharePoint 2010. I have have two options 1. using SharePoint Object Model 2. Front Page Method. 我需要删除SharePoint 2010网站集的子网站。我有两个选择:1.使用SharePoint对象模型2.前页方法。

Any idea which option is better or what is different between two? 知道哪个选项更好,或者两者之间有什么不同?

Thanks. 谢谢。

They result in the same outcome. 它们导致相同的结果。 The UI calls the underlying commands in the object model anyway. UI始终会调用对象模型中的基础命令。 Go with whichever method you're more comfortable with. 使用您更喜欢的任何一种方法。

powershell中 ,键入以下内容:

Remove-SPWeb "http://ursite/" -Confirm:$false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM