Search and Set ProductVersion from a .dll file

Hello PowerShell community that rocks the Dev/IT world,

What do I want to accomplish?

Via PowerShell perform a search of a specific .dll file and from it extract the ProductVersion which will allow identifying if the software release is an -RC and not a final version non -RC and afterwards use that ProductVersion to other postprocessing activities,

What values can I see when do open the .dll file with VisualStudio ?

There are two columns, Key and value and below of it the series of available Versions and Descriptons :

  • FILEVERSION: 1,1,0,0
  • PRODUCTVERSION: 1,1,0,0
  • FILELAGSMASK: 0x3fl
  • FILEFLAGS: 0x0L
  • FILEOS: 0x4L
  • FILETYPE: 0x4L
  • Assembly Version: 1,1,0,0
  • FILEVERSION: 1,1,0,0
  • ProductVersion : 1,1,0,0- RC2 -->this is the type of version we require to find and afterward set

What have you tried? Do you have any code?