Since PowerShell can call .NET classes, you could do the following:
[System.Diagnostics.FileVersionInfo]::GetVersionInfo("somefilepath").FileVersion
Or as noted here on a list of files:
get-childitem * -include *.dll,*.exe | foreach-object { "{0}`t{1}" -f $_.Name, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
Or even nicer as a script: https://jtruher3.wordpress.com/2006/05/14/powershell-and-file-version-information/
Related Posts:
- Python error message io.UnsupportedOperation: not readable
- Python -How to solve OSError: [Errno 22] Invalid argument
- What does \x00 mean in binary file?
- System.ComponentModel.Win32Exception (0x80004005): Access is denied on ixwebhosting
- C++ Filehandling: Difference between ios::app and ios::ate?
- What does ‘wb’ mean in this code, using Python?
- Simple PowerShell LastWriteTime compare
- Difference between java.io.PrintWriter and java.io.BufferedWriter?
- How do I copy a file in Python?
- TypeError: a bytes-like object is required, not ‘str’ when writing to a file in Python3
- How to compare two files in Notepad++ v6.6.8
- How do I start PowerShell from Windows Explorer?
- How to run a PowerShell script
- Do I understand os.walk right?
- How to run powershell script from .ps1 file?
- FileNotFoundError: [Errno 2] No such file or directory [duplicate]
- How to move a file in Python?
- Connect-AzAccount – how to avoid azure device authentication?
- How do I concatenate strings and variables in PowerShell?
- PowerShell equivalent to grep -f
- How to move a file in Python?
- How do you comment out code in PowerShell?
- Setting Windows PowerShell environment variables
- How do you append to a file?
- Replace substring in PowerShell
- Echo equivalent in PowerShell for script testing
- Writing a list to a file with Python
- Check if a file exists or not in Windows PowerShell?
- PowerShell and the -contains operator
- Change directory in PowerShell
- How do I copy a file in Python?
- Splitting a string into separate variables
- Reading from file using read() function
- How to export data to CSV in PowerShell?
- How to run an EXE file in PowerShell with parameters with spaces and quotes
- Prompt for user input in PowerShell
- How to force file download with PHP
- How to upgrade PowerShell version from 2.0 to 3.0
- How to copy a file from one directory to another using PHP?
- Array.Add vs +=
- How can I pass an argument to a PowerShell script?
- How can I check file size in Python?
- Rename a file in C#
- how to “execute” make file
- Powershell: A positional parameter cannot be found that accepts argument “xxx”
- Python list directory, subdirectory, and files
- PowerShell string interpolation syntax
- How to write to the console in PowerShell?
- Download File Using jQuery
- In C, how should I read a text file and print all strings
- PowerShell ‘Or’ Statement
- What is the best/simplest way to read in an XML file in Java application?
- powershell -Or operator not working
- Rename a file using Java
- How to decode a Base64 string?
- Copy file remotely with PowerShell
- What does it mean to mount a file system in linux?
- Path to Powershell.exe (v 2.0)
- How to unzip a file in Powershell?
- How to open a file for both reading and writing?
- Equivalent of *Nix ‘which’ command in PowerShell?
- Copy-Item is overwriting by default
- The term ‘Get-ADUser’ is not recognized as the name of a cmdlet
- What is the perfect counterpart in Python for “while not EOF”
- The term ‘nmake’ is not recognized
- What are .S files?
- Ternary operator in PowerShell
- How can I get the list of files in a directory using C or C++?
- Upload file to SFTP using PowerShell
- How to use Javascript to read local text file and read line by line?
- c++ Read from .csv file
- Count how many files in directory PHP
- How do I include a JavaScript file in another JavaScript file?
- Creating files and directories via Python
- JavaScript: Create and save file
- Does PowerShell has something like “echo off” and “echo on” trigger?
- How to delete a specific line in a file?
- Invalid escape sequence (valid ones are \b \t \n \f \r \” \’ \\ )
- How can I test that a variable is more than eight characters in PowerShell?
- How often does python flush to a file?
- How to open every file in a folder
- PowerShell: Comparing dates
- Press any key to continue
- How do I get the current username in Windows PowerShell?
- TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper
- How do I do ‘dir /s /b’ in PowerShell?
- Create Log File in Powershell
- what is a file handle and where it is useful for a programmer?
- Loading and parsing a JSON file with multiple JSON objects
- What does the double asterisks mean?
- Java FileOutputStream Create File if not exists
- How can I delete a file that is in use by another process?
- Android; Check if file exists without creating a new one
- How can I get the count of line in a file in an efficient way?
- What is a file based database?
- Passing multiple values to a single PowerShell script parameter
- Sometimes PowerShell stops sending output until I press enter. Why?
- How do I diff two text files in Windows Powershell?
- In a PowerShell script, how can I check if I’m running with administrator privileges?
- What is the literal escape character in Powershell?