mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Add datatype to param()
This commit is contained in:
@ -11,13 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($PathToExe = "")
|
||||
|
||||
if ($PathToExe -eq "" ) {
|
||||
$PathToExe = read-host "Enter path to executable file"
|
||||
}
|
||||
param([string]$PathToExe = "")
|
||||
|
||||
try {
|
||||
if ($PathToExe -eq "" ) { $PathToExe = read-host "Enter path to executable file" }
|
||||
|
||||
get-childitem $PathToExe | % {$_.VersionInfo} | Select *
|
||||
exit 0
|
||||
} catch {
|
||||
|
Reference in New Issue
Block a user