I'm writing a script which gets the version of an item given the URL. However I can't seem to get the versions.
$objFile = $web.GetFile($sitecollection+/ZB/Forms/DispForm.aspx?ID=5266)
Write-host $objFile.MinorVersion
however this doesn't seem to bring back the right results.
What is the right way to get the version based on the url being dispformid=x