Steps
- Start your windows PowerShell on your computer.
- Right click and select Run as administrator option.
- Paste the below script on the PowerShell window and click the enter button.
- Check your SharePoint site Feature will activated successfully.
- $Site = Get-SPSite http:
-
- $Webs = $Site.AllWebs
-
- foreach ($Web in $Webs)
- {
- foreach ($List in $web.Lists)
- {
-
-
- if($List.EnableVersioning)
- {
- $Item=$List.Items[0]
- foreach($Version in $Item.Versions)
- {
- Write-Host "Documen Library Name:" $List.Title "-" "Document Name:" $Item.Title $Version.VersionLabel
- }
- }
- }
- }
- $Web.Dispose()
- $Site.Dispose()
Run the script with the required administrator privilege. To verify that, Check the output window.
Thanks For reading.