إفراغ جميع صناديق إعادة تدوير الموقع
-
10-12-2019 - |
سؤال
هل من الممكن إفراغ جميع صناديق إعادة التدوير في مجموعة المواقع؟حاولت الذهاب إلى سلة المحذوفات الموجودة في صفحة المسؤول ولكنها كانت فارغة.
المحلول
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();
لا تنتمي إلى sharepoint.stackexchange