logo
search
SharePoint Document Issues

Fix File Not Found in SharePoint New-SPOListFileVersionExpirationReportJob

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

The user encounters a 'File Not Found' error when trying to generate a list version report using the New-SPOListFileVersionExpirationReportJob PowerShell cmdlet in SharePoint Online.

Product
SharePoint Online
Device & OS
not provided
Scenario
Generating a list version expiration report via SharePoint Online PowerShell.
Observed behavior
The command fails to execute and returns a 'File Not Found' error, preventing the version report CSV file from being created.
Before you start

Ensure you have the necessary SharePoint administrator permissions and that your PowerShell session is actively connected to your SharePoint Online admin center.

Solution 1Recommended

Specify an Existing Document Library in ReportUrl

Fix the error by ensuring the ReportUrl parameter points to a document library that already exists on your SharePoint Online site.

The 'File Not Found' error occurs because the path specified in the ReportUrl parameter does not exist. The New-SPOListFileVersionExpirationReportJob cmdlet cannot create new folders or libraries on the fly. If you provide a path like '/sites/Test/Reports/VersionReport.csv' but the 'Reports' library has not been created yet, the execution will fail.

1
Verify existing libraries

Log in to your SharePoint Online site and identify an active, existing document library where you want to store the report (e.g., 'Shared Documents').

2
Update the ReportUrl path

Modify your PowerShell script to use the valid path of the existing library. For example, change your parameter to -ReportUrl '/sites/YourSite/Shared Documents/VersionReport.csv'.

3
Run the cmdlet again

Execute the New-SPOListFileVersionExpirationReportJob command in PowerShell with the updated path to successfully generate the report.

Report Successfully Generated: Once a valid document library location is provided, the background job will run, and the CSV version report will be generated at your specified path.
Free Microsoft Office alternative

Manage Your Exported SharePoint Reports with WPS Office

After successfully exporting your SharePoint list version reports as CSV files, use WPS Office to open, filter, and analyze your data. It is a lightweight, free alternative to Microsoft Office that offers full compatibility with spreadsheet formats.

  1. 1. Download and install: Download WPS Office from the official website and complete the quick installation process.
  2. 2. Open WPS Spreadsheet: Launch WPS Office and select the Spreadsheet module from the main dashboard.
  3. 3. Import your report: Click on 'File' > 'Open' and select the CSV file you exported from SharePoint to view and analyze your data.
Seamless compatibility with Microsoft Excel CSV and XLSX formatsLightweight application that opens large report files instantlyFree, user-friendly interface that requires no learning curveBuilt-in advanced data analysis and filtering tools
microsoft office alternative - wps office

Frequently Asked Questions

What is the New-SPOListFileVersionExpirationReportJob cmdlet used for?

This SharePoint Online PowerShell cmdlet generates a report detailing the file versions that are set to expire within a specific SharePoint document library or site.

Can the cmdlet create a new folder for the report automatically?

No, the destination path provided in the ReportUrl parameter must belong to a document library that already exists in SharePoint. The cmdlet will not create missing directories, which is why it throws a 'File Not Found' error.

Why isn't my CSV report appearing immediately after running the command?

Generating the version expiration report is processed as a background job in SharePoint Online. It may take some time to appear in your document library depending on the size of the list and the number of versions being processed.