Dear Admin,
Good day!! I hope you are doing well~
As per the description shared, I understand your concern and I would like to convey that I have tested the behavior at my end where the New-SPOSiteFileVersion and New-SPOListFileVersion are present in the latest SharePoint Online PowerShell module:
So, I request you check whether you are using the latest SharePoint Online PowerShell module:
Step 1: Open the Windows PowerShell ISE as an administrator> Run the following command Update-Module -Name Microsoft.Online.SharePoint.PowerShell
Step 2: Now enter Get-Help ‘New-Spolist’ -ShowWindow and see whether you get New-SPOListFileVersion
Step 3: Now enter Get-Help ‘New-SpositeF’ -ShowWindow and see whether you get New-SPOSiteFileVersion
If yes, then you can follow the following articles:
New-SPOSiteFileVersionBatchDeleteJob (Microsoft.Online.SharePoint.PowerShell) | Microsoft Learn
New-SPOSiteFileVersionExpirationReportJob (Microsoft.Online.SharePoint.PowerShell) | Microsoft Learn
For enabling site version limits or library version limits, please refer to the commands in the following articles:
Site Version Limits: Change version history limits for a Site - SharePoint in Microsoft 365 | Microsoft Learn
Library Version Limits: Set version limits for a document library - SharePoint in Microsoft 365 | Microsoft Learn
If you still encounter the error, can you please share the following information which will help us to better understand and guide you further:
- Screenshot of the error message encountered when running the command mentioned in the articles.
- SharePoint Online PowerShell Module version. Open your PowerShell as an administrator> Run the command Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version > Take the screenshot of the output and share it with us.
Our sincere apologies for not resolving the problem in the first reply but answers to the above queries will help us to better understand your situation and guide you in the right direction.
Appreciate your patience and understanding. Have a great day!!
Best Regards,
Sophia