You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get-PnPRecycleBinItem
This command does NOT return all items from First and Second stage recycle bin. Tried with and without the -RowLimit and there was no difference. Tested with 2.4.0
Expected behavior
Get-PnPRecycleBinItem returns all items from BOTH First and Second stage recycle bin.
Actual behavior
Get-PnPRecycleBinItem only returns items from First stage recycle bin.
Basically the script just calls CSOM Method Site.GetRecycleBinItems() with itemState None if you do not specify any state, so maybe behaviour of that "black box" has changed.
So you are right that the documentation for Example 1 should say "First recycle bin" but the functionality is "per design" as it is out of our hands.
Your solution is the correct way to do it if you need both!
Reporting an Issue or Missing Feature
Get-PnPRecycleBinItem
This command does NOT return all items from First and Second stage recycle bin. Tried with and without the -RowLimit and there was no difference. Tested with 2.4.0
Expected behavior
Get-PnPRecycleBinItem returns all items from BOTH First and Second stage recycle bin.
Actual behavior
Get-PnPRecycleBinItem only returns items from First stage recycle bin.
Also please update your documentation here for "Example 1" as it is not accurate.
https://pnp.github.io/powershell/cmdlets/Get-PnPRecycleBinItem.html
Steps to reproduce behavior
$recycleBinItemsAll = Get-PnpRecycleBinItem
$recycleBinItemsAll.Count
$recycleBinItemsFirst = Get-PnpRecycleBinItem -FirstStage
$recycleBinItemsFirst.Count
$recycleBinItemsSecond = Get-PnpRecycleBinItem -SecondStage
$recycleBinItemsSecond.Count
Work-around
$recycleBinItemsFirst = Get-PnpRecycleBinItem -FirstStage
$recycleBinItemsFirst.Count
$recycleBinItemsSecond = Get-PnpRecycleBinItem -SecondStage
$recycleBinItemsSecond.Count
$recycleBinItems = $recycleBinItemsFirst + $recycleBinItemsSecond
$recycleBinItems.Count
What is the version of the Cmdlet module you are running?
2.4.0
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: