Get‑FileVersion - dsccommunity/DscResource.Common GitHub Wiki
Returns the version information for a file.
Get-FileVersion [-Path] <FileInfo> [<CommonParameters>]
Returns the version information for a file including the product version, file version, and other version-related metadata.
Get-FileVersion -Path 'E:\setup.exe'
Returns the version information for the file setup.exe.
Get-Item -Path 'E:\setup.exe' | Get-FileVersion
Returns the version information for the file setup.exe using pipeline input.
'E:\setup.exe' | Get-FileVersion
Returns the version information for the file setup.exe using pipeline input.
Specifies the file for which to return the version information.
Type: FileInfo
Parameter Sets: (All)
Aliases: FullName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.