In the recycle bin there are 176100 items. I have tried to remove them using PowerShell but it is unable to remove all. After sometime it stops and gives an error. Tried following PowerShell.
$WebApp=get-spwebapplication "http://xxxx:31150/"
foreach ($SPSite in $webApp.Sites)
{
#get the collection of webs
foreach($SPWeb in $SPSite.AllWebs)
{
write-host "deleting recycle bin for:"
write-host $SPWeb.title ":" $SPWeb.URL "`n"
#Empty the 1st Stage Recycle bin items PERMENANTLY
$SPWeb.RecycleBin.DeleteAll();
#Send the 1st Stage Recycle bin items to 2nd Stage
$SPWeb.RecycleBin.MoveAllToSecondStage();
}
#Empty SharePoint site collection recycle bin (Second Stage Recycle bin) or Admin Recycle bin
$SPSite.RecycleBin.DeleteAll();
write-host "Administrator Recycle bin Items Deleted for:" $SPSite.RootWeb.title "`n"
}
In the database there is a table called dbo.RecycleBin
. So my question: Is there any risk if I delete all rows from this table?