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
The Get-PnPRecycleBinItem documentation specifically states that if Get-PnPRecycleBinItem is called without passing either -FirstStage or -SecondStage, the cmdlet will return "All" items in the recycle bin.
This is not correct however, in fact the -FirstStage is implied even when not passed explicitly and the only way to get a list of all items in the recycle bin is to run the cmdlet twice (once with -FirstStage and again with -SecondStage) and then merge the result sets together.
In essence, Get-PnPRecycleBinItem -FirstStage and Get-PnPRecycleBinItem are identical.
Scenario:
There are 3,000 items in the recycle bin overall
There are 1,000 items in the first stage recycle bin
There are 2,000 items in the second stage recycle bin
Expected behavior
Running Get-PnPRecycleBinItem -FirstStage returns the 1,000 items in the first stage recycle bin
Running Get-PnPRecycleBinItem -SecondStage returns the 2,000 items in the second stage recycle bin
Running Get-PnPRecycleBinItem returns all 3,000 items in the recycle bin, across both the first and second stages
Actual behavior
Running Get-PnPRecycleBinItem -FirstStage returns the 1,000 items in the first stage recycle bin
Running Get-PnPRecycleBinItem -SecondStage returns the 2,000 items in the second stage recycle bin
Running Get-PnPRecycleBinItem also returns the 1,000 items in the first stage recycle bin (only) and does return any items that are in the second stage recycle bin
Steps to reproduce behaviour
Replicate the above scenario and tests
What is the version of the Cmdlet module you are running?
3.1.0
Which operating system/environment are you running PnP PowerShell on?
Issue description
Get-PnPRecycleBinItemis called without passing either-FirstStageor-SecondStage, the cmdlet will return "All" items in the recycle bin.-FirstStageis implied even when not passed explicitly and the only way to get a list of all items in the recycle bin is to run the cmdlet twice (once with-FirstStageand again with-SecondStage) and then merge the result sets together.Get-PnPRecycleBinItem -FirstStageandGet-PnPRecycleBinItemare identical.Scenario:
Expected behavior
Get-PnPRecycleBinItem -FirstStagereturns the 1,000 items in the first stage recycle binGet-PnPRecycleBinItem -SecondStagereturns the 2,000 items in the second stage recycle binGet-PnPRecycleBinItemreturns all 3,000 items in the recycle bin, across both the first and second stagesActual behavior
Get-PnPRecycleBinItem -FirstStagereturns the 1,000 items in the first stage recycle binGet-PnPRecycleBinItem -SecondStagereturns the 2,000 items in the second stage recycle binGet-PnPRecycleBinItemalso returns the 1,000 items in the first stage recycle bin (only) and does return any items that are in the second stage recycle binSteps to reproduce behaviour
What is the version of the Cmdlet module you are running?
Which operating system/environment are you running PnP PowerShell on?