PowerShell/Scripts/inspect-exe.ps1
2020-12-08 15:01:57 +00:00

20 lines
433 B
PowerShell
Executable File

#!/snap/bin/powershell
# Syntax: ./inspect-exe.ps1 [<executable-file>]
# Description: prints basic information of the given executable file
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
param([string]$File)
if ($File -eq "" ) {
$File = read-host "Enter path to executable file"
}
try {
get-childitem $File | % {$_.VersionInfo} | Select *
exit 0
} catch { Write-Error $Error[0] }
exit 1