Powershell 2.0 Param-Schlüsselwortfehler

Ich verwende Windows 7 RTM. Powershell 2.0 ist standardmäßig installiert. Ich benutze die exzellente Windows PowerShell ISE, um meine Skripte zu bearbeiten. Ich habe das folgende Skript:

Param($p)
Param($d)
echo $p $d

Ich speichere das Skript als SayItAgain.ps1. Wenn ich versuche, dieses Skript über die interaktive Shell wie folgt auszuführen:

./SayItAgain -p "Hello"

Ich erhalte folgenden Fehler:

The term 'Param' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling o
f the name, or if a path was included, verify that the path is correct and try again.
At C:\users\cius\Code\powershell\SayItAgain.ps1:2 char:6
+ Param <<<< ($destination)
    + CategoryInfo          : ObjectNotFound: (Param:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Ist das ein bekanntes Problem oder verwende ich es einfach falsch?

Antworten auf die Frage(3)

Ihre Antwort auf die Frage