mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-17 16:11:22 +02:00
Add datatype to param()
This commit is contained in:
@@ -11,13 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($File = "")
|
||||
|
||||
if ($File -eq "" ) {
|
||||
$File = read-host "Enter path to XML file"
|
||||
}
|
||||
param([string]$File = "")
|
||||
|
||||
try {
|
||||
if ($File -eq "" ) { $File = read-host "Enter path to XML file" }
|
||||
|
||||
$XmlFile = Get-Item $File
|
||||
|
||||
$script:ErrorCount = 0
|
||||
|
Reference in New Issue
Block a user