mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 05:43:53 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($Path = "")
|
||||
if ($Path -eq "" ) { $Path = read-host "Enter path to CSV file" }
|
||||
param([string]$Path = "")
|
||||
|
||||
try {
|
||||
if ($Path -eq "" ) { $Path = read-host "Enter path to CSV file" }
|
||||
|
||||
$Table = Import-CSV -path "$Path" -header A,B,C,D,E,F,G,H
|
||||
|
||||
foreach($Row in $Table) {
|
||||
|
Reference in New Issue
Block a user