使用 stsadm 命令删除 sharepoint 2010 文档库?

发布于 2024-11-03 08:29:34 字数 160 浏览 0 评论 0原文

我正在将 sharepoint 2010 自定义文档库模板部署为解决方案文件并将其激活到我的站点。当我删除解决方案并停用该功能时,我还想删除从此模板创建的库及其所有内容。我有一个执行停用操作的 uninstaller.bat 文件,我想在卸载程序中包含库删除脚本。是否可以通过 stsasdm 命令删除库?

I am deploying a sharepoint 2010 custom document library template as a solution file and activating it to my site. When i am deleting the solution and deactivating the feature i also want to delete the libraries that were created from this template with all its contents. I have an uninstaller.bat file that performs the deactivation, i want to include the library removal script with the uninstaller. Is it possible to remove the libraries through stsasdm command?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如梦 2024-11-10 08:29:34

您可以编写一个功能接收器 http://msdn.microsoft.com/en-us /library/ms469501.aspx 当该功能停用时运行,它将为您处理删除操作。

You could write a Feature Receiver http://msdn.microsoft.com/en-us/library/ms469501.aspx that runs when the Feature is deactivated that will take care of the deletes for you.

暗藏城府 2024-11-10 08:29:34

您可以使用强制删除列表,但您需要了解要删除的库的 URL。 注意,尽管有这个名字,如果AllowDeletion 设置为 false。

需要考虑两件事:

  1. 在 SharePoint 2010 中,stsadm 已弃用,取而代之PowerShell 的。
  2. 对我来说,在 FeatureDeactivating 方法而不是在脚本中。

You can use Forcedeletelist, but you will need to know the URLs of the libraries you want to delete. Note, despite the name, this command will not delete the list if AllowDeletion is set to false.

Two things to consider:

  1. In SharePoint 2010, stsadm has been deprecated in favor of PowerShell.
  2. To me, it would make more sense to perform this operation in the FeatureDeactivating method of a Feature Receiver instead of in a script.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文