I am using Batch Delete using Powershell.
After batch delete, items are moved to recycle bin.
spWeb.RecycleBin.DeleteAll(); will delete all items from recycle bin. Instead, i want to remove only those items which i have batch deleted.
For that, i came across a command
spWeb.RecycleBin.Delete(Guid ids); but i am missing something while implementing it. As a result i am getting error :
Exception calling "Delete" with "1" argument(s): "Specified argument was out of the range of valid values.Parameter name: ids"
Following is the PowerShell Code used to achieve the same:
[Guid]$a = "fcfdc7d3-ef59-4988-b3e9-0ae7184c6c4f" (Sample GUID Present in recycle bin) $deletions = New-Object Collections.Generic.List[System.Guid]; $deletions.Add($a) $ArchiveWeb.RecycleBin.Delete($deletions.ToArray());
What i am missing here?