题
是否可以在网站集中清空所有回收站?我尝试进入位于管理员页面上的回收站,但它是空的。
解决方案
The following powershell script will delete all items in the site collection recycle bin and recycle bins of each of the webs in the provided sitecollection url:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint");
$site = new-object microsoft.sharepoint.spsite("SITE COLLECTION URL");
for ($i=0;$i -lt $site.allwebs.count;$i++)
{
if($site.allwebs[$i].recyclebin.count >0)
{
$site.allwebs[$i].recyclebin.deleteall();
}}
$site.recyclebin.deleteall();
$site.dispose();