mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Renamed to inspect-exe.ps1
This commit is contained in:
19
Scripts/inspect-exe.ps1
Executable file
19
Scripts/inspect-exe.ps1
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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
|
Reference in New Issue
Block a user