I want to create a powershell script to pull specific data from a specific property from a specif file. So in a nutshell. I want to get the FileVersion data out of the property of versioninfo from a .exe.
I'm using the following command to get file and view the property value from above.
dir c:\windows\system32\dfc.exe | fl versioninfo
the output is has follows
VersionInfo : File: C:\windows\system32\dfc.exe
InternalName: dfcmnd.exe
OriginalFilename: DFC.exe
FileVersion: 7,30,220,3852
FileDescription: Command line utility for Deep Freeze 7.00
Product: Deep Freeze 7.00
ProductVersion: 7.30.220.3852
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: English (United States)
but all that I want is
Fileversion: 7.30.220.3852
I can not think of a way to get just that data out and discard the rest.
Thanks.