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
I'm reporting an issue with the Restore-PnPRecycleBinItem cmdlet which appears to have a type conversion problem that makes it impossible to restore items from the recycle bin.
Expected behavior
When using Restore-PnPRecycleBinItem with an Identity parameter (either directly or piped from Get-PnPRecycleBinItem), the cmdlet should successfully restore the item to its original location as shown in the help examples.
Actual behavior
The cmdlet fails with type conversion errors regardless of how the Identity is provided:
When using direct ID:
Restore-PnPRecycleBinItem-Identity $torestore.IdRestore-PnPRecycleBinItem: Cannot bind parameter 'Identity'. Cannot convert the "12617497-069e-4fe3-a032-39b5f3956406" value of type "System.Guid" to type "PnP.PowerShell.Commands.Base.PipeBind.RecycleBinItemPipeBind".
When piping from Get-PnPRecycleBinItem:
Get-PnPRecycleBinItem-Identity $torestore.Id|Restore-PnPRecycleBinItemGet-PnPRecycleBinItem: Cannot bind parameter 'Identity'. Cannot convert the "Microsoft.SharePoint.Client.RecycleBinItem" value of type "Microsoft.SharePoint.Client.RecycleBinItem" to type "System.Guid".
Even when trying to pipe the entire command:
Restore-PnPRecycleBinItem-Identity ( Get-PnPRecycleBinItem-Identity $torestore.Id )
Restore-PnPRecycleBinItem: Object reference not set to an instance of an object.
Steps to reproduce behavior
Connect to a SharePoint site using Connect-PnPSite
Get a recycle bin item using Get-PnPRecycleBinItem
Try to restore it using any of the following methods:
Reporting an Issue or Missing Feature
I'm reporting an issue with the
Restore-PnPRecycleBinItem
cmdlet which appears to have a type conversion problem that makes it impossible to restore items from the recycle bin.Expected behavior
When using
Restore-PnPRecycleBinItem
with an Identity parameter (either directly or piped from Get-PnPRecycleBinItem), the cmdlet should successfully restore the item to its original location as shown in the help examples.Actual behavior
The cmdlet fails with type conversion errors regardless of how the Identity is provided:
Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
Please include the output of Get-Module -Name "PnP.PowerShell" -ListAvailable
Which operating system/environment are you running PnP PowerShell on?
Based on the command prompt shown in the screenshots, this is being run on Windows.
The text was updated successfully, but these errors were encountered: