Vider tous les bacs de recyclage de site
-
10-12-2019 - |
Question
est-il possible de vider tous les bacs de recyclage dans une collection de sites?J'ai essayé d'entrer dans la corbeille de recyclage située sur la page d'administrateur, mais c'était vide.
La solution
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();
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange