Hi @kewally,
Versioning is a list-level setting, so it is impossible to be enabled at the site level. We can enable versioning (only major version) for all existing lists and libraries using below PnP PowerShell.
$SiteURL = "https://xxx.sharepoint.com"
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
#Get All Lists from the web
$Lists = Get-PnPList | Where {$_.Hidden -eq $false}
ForEach($List in $Lists)
{
#Enable versioning and set Number of versions to 50
Set-PnPList -Identity $List -EnableVersioning $True -MajorVersions 50
Write-host -f Yellow "Configured Versioning on List:"$List.Title
}
For more information, take a reference to this article: SharePoint Online: Enable Versioning on All Lists and Libraries using PowerShell .
If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.