Powershell Error : 0x80070003

Error: <nativehr>0x80070003</nativehr><nativestack><nativestack>

Description : Our SharePoint farm was recently upgraded from SharePoint 2010 to SharePoint 2016. While running  SharePoint Permission Report on this farm, the below error occurs.

ErrorPR

The error message means that the backup of the site collection has older schema version than the current version.  Ref.

While doing migration, there were some unused site collections which did not get upgraded.  And the powershell script was unable to read these site collections and hence throwing error.

Solution : I modified the powershell script to enumerate through only the valid site collections. Once this one was done, no error occurred.