Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [System.Diagnostics.FileVersionInfo]::GetVersionInfo("somefilepath").FileVersion
- get-childitem * -include *.dll,*.exe | foreach-object { "{0}`t{1}" -f $_.Name, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).LegalCopyright }
- (Get-Command C:PathYourFile.Dll).FileVersionInfo
- dir *.dll,*.exe | %{gcm $_.FullName} | select -expand File*
- PS C:Windows> (dir .write.exe).VersionInfo | fl
- OriginalFilename : write
- FileDescription : Windows Write
- ProductName : Microsoft® Windows® Operating System
- Comments :
- CompanyName : Microsoft Corporation
- FileName : C:Windowswrite.exe
- FileVersion : 6.1.7600.16385 (win7_rtm.090713-1255)
- ProductVersion : 6.1.7600.16385
- IsDebug : False
- IsPatched : False
- IsPreRelease : False
- IsPrivateBuild : False
- IsSpecialBuild : False
- Language : English (United States)
- LegalCopyright : © Microsoft Corporation. All rights reserved.
- LegalTrademarks :
- PrivateBuild :
- SpecialBuild :
- PS C:Windows> dir *.exe | %{ $_.VersionInfo }
- ProductVersion FileVersion FileName
- -------------- ----------- --------
- 6.1.7600.16385 6.1.7600.1638... C:Windowsbfsvc.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowsexplorer.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowsfveupdate.exe
- 6.1.7600.16385 6.1.7600.1638... C:WindowsHelpPane.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowshh.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowsnotepad.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowsregedit.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowssplwow64.exe
- 1,7,0,0 1,7,0,0 C:Windowstwunk_16.exe
- 1,7,1,0 1,7,1,0 C:Windowstwunk_32.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowswinhlp32.exe
- 6.1.7600.16385 6.1.7600.1638... C:Windowswrite.exe
- [System.Diagnostics.FileVersionInfo]::GetVersionInfo("PathToFile.dll")
- [System.Diagnostics.FileVersionInfo]::GetVersionInfo("PathToFile.dll")
- [System.Diagnostics.FileVersionInfo]::GetVersionInfo("PathToFile.dll")
- [System.Diagnostics.FileVersionInfo]::GetVersionInfo(path).CompanyName
Add Comment
Please, Sign In to add comment