Forum Discussion
PRebelo
Aug 02, 2023Copper Contributor
Unable to retrieve version history of a file.
$file = Get-PnPFile -Url "https://???/sites/???/Shared%20Documents/some-file.docx"
correctly returns the file object.
$versions = Get-PnPProperty -ClientObject $file -Property Versions
Get-PnPProperty : The object id "site:???:web:???:file:/sites/???/https:
//???/sites/???/Shared Documents/some-file.docx" is invalid.
At line:1 char:13
+ $versions = Get-PnPProperty -ClientObject $file -Property Versions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Get-PnPProperty], ServerException
+ FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Base.EnsureProperty
This is consistent for different files in different tenants that I have tested.
Am using PnP PowerShell v1.1.10
No RepliesBe the first to reply