Get‑FileProductVersion - dsccommunity/DscResource.Common GitHub Wiki
Gets the product version of a file.
Get-FileProductVersion [-Path] <String> [<CommonParameters>]
Gets the product version of a file and returns it as a System.Version object. This can be useful for checking the version of installed components or binaries.
Get-FileProductVersion -Path 'C:\Temp\setup.exe'
Returns the product version of the file setup.exe as a System.Version object.
The path to the file to get the product version from.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.