One of my team members recently tried to figure out how to disable versioning in a SharePoint library. As there is no option in the UI ( User Interface), it is not possible to do this using the browser. I suggested using PnP PowerShell to disable the SharePoint list and library versioning.
Let’s see how to do it.
Disable Versioning in a SharePoint Library Using PnP PowerShell
If you are new to versioning in SharePoint, here is a quick definition.
Versioning in SharePoint is a feature that allows users to track and manage changes to documents and list items in a SharePoint list or document library. It creates a historical record of changes, including the date/time and the user who made the change.
By default, versioning is enabled in both lists and libraries in SharePoint Online. If you do not want versioning, you can disable it using PowerShell, as there is no option to disable it using the browser. Microsoft removed the disabling option through UI.
You can version settings in a library by following the steps.
- Open the SharePoint library, click the Settings icon -> Library settings, and then click More library settings.
- This will open the settings page, and here, click on the “Versioning settings”. This will open the Versioning Settings page, and here you can see there is no option to disable the versioning. Check the screenshot for reference.

So, now let me show you how to disable versioning for this SharePoint document library using PnP PowerShell.
If you are new to PnP PowerShell, check this tutorial first to learn how to connect to a SharePoint site using PnP PowerShell.
To disable versioning in a SharePoint document library using PnP PowerShell, you can use the following cmdlet:
# Connect to the SharePoint site
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam/" -UseWebLogin
# Disable versioning for the specific document library
Set-PnPList -Identity "Marketing Documents" -EnableVersioning $falseHere’s a breakdown of the commands:
- Connect-PnPOnline: This cmdlet connects to your SharePoint Online site. Replace
"https://szg52.sharepoint.com/sites/MarketingTeam/"with the URL of your SharePoint site. - Set-PnPList: This cmdlet modifies the settings of a SharePoint list or library. The
-Identityparameter specifies the name of the library, and the-EnableVersioning $falseparameter disables versioning for that library.
You can see the message after I executed the above script using VS code.

After this, when you open the Versioning Settings page, you will see the “No versioning” option in the “Document Version History“.
Check the screenshot below.

This is how to disable versioning in a SharePoint list or document library using PnP PowerShell.
If you want to check whether versioning is disabled, run the PowerShell script below.
# Connect to the SharePoint site
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam/" -UseWebLogin
$list = Get-PnPList -Identity "Marketing Documents"
$list.EnableVersioningIf it returns false then the versioning is disabled, and you can see the screenshot below:

And, if you want to enable the versioning for the document library again, you need to change -EnableVersioning $true, and the full script is like below:
# Connect to the SharePoint site
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam/" -UseWebLogin
# Disable versioning for the specific document library
Set-PnPList -Identity "Marketing Documents" -EnableVersioning $trueConclusion
As there is no option to disable versioning in a SharePoint list or library’s UI, you have to use PowerShell. In this tutorial, I explained how to disable versioning in a SharePoint list or document library using PnP PowerShell.
If you still have questions, feel free to leave a comment below.
You may also like:
- Connect-SPOService : Current site is not a tenant administration site
- Create a Site in SharePoint Online using PnP PowerShell
- Delete SharePoint list item using PnP PowerShell
- Delete All Items from a SharePoint List using PnP PowerShell
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.