Last active
July 9, 2018 20:17
-
-
Save rglos/d0224ca3249e0769c3bdde2a3d363af8 to your computer and use it in GitHub Desktop.
Get versions of file via PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = "C:\Path\To\Some.dll" | |
$versionInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($path) | |
$assemblyName = [System.Reflection.AssemblyName]::GetAssemblyName($path) | |
Write-Host ("FileName: {0}" -f $versionInfo.FileName) | |
Write-Host ("AssemblyVersion: {0}" -f $assemblyName.Version) | |
Write-Host ("AssemblyFileVersion: {0}" -f $versionInfo.FileVersion) | |
Write-Host ("AssemblyInformationalVersion: {0}" -f $versionInfo.ProductVersion) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment