使用 stsadm 命令删除 sharepoint 2010 文档库?
我正在将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以编写一个功能接收器 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.
您可以使用强制删除列表,但您需要了解要删除的库的 URL。 注意,尽管有这个名字,如果AllowDeletion 设置为 false。
需要考虑两件事:
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: