How to Show Version History in SharePoint 2013 using PowerShell

Steps
  1. Start your windows PowerShell on your computer.
  2. Right click and select Run as administrator option.
  3. Paste the below script on the PowerShell window and click the enter button.
  4. Check your SharePoint site Feature will activated successfully.
  1. $Site = Get-SPSite http://gauti.sharepoint.com/sites    
  2.     
  3. $Webs = $Site.AllWebs    
  4.     
  5. foreach ($Web in $Webs)    
  6. {    
  7. foreach ($List in $web.Lists)    
  8. {    
  9. //Check if the Versioning is enabled or not.    
  10.     
  11. if($List.EnableVersioning)    
  12. {    
  13. $Item=$List.Items[0]    
  14. foreach($Version in $Item.Versions)    
  15. {    
  16. Write-Host "Documen Library Name:" $List.Title "-" "Document Name:" $Item.Title $Version.VersionLabel    
  17. }    
  18. }    
  19. }    
  20. }    
  21. $Web.Dispose()    
  22. $Site.Dispose()    
Run the script with the required administrator privilege. To verify that, Check the output window.
 
Thanks For reading.