Get‑FileProductVersion - dsccommunity/DscResource.Common GitHub Wiki

SYNOPSIS

Gets the product version of a file.

SYNTAX

Get-FileProductVersion [-Path] <String> [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

EXAMPLE 1

Get-FileProductVersion -Path 'C:\Temp\setup.exe'

Returns the product version of the file setup.exe as a System.Version object.

PARAMETERS

-Path

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Version

NOTES

RELATED LINKS

⚠️ **GitHub.com Fallback** ⚠️