PowerShell 2.0 and “The term 'Param' is not recognized as the name of a cmdlet, function, script file, or operable program”

后端 未结 4 1340
北荒
北荒 2020-12-29 00:59

I am running Windows 7 RTM. PowerShell 2.0 is installed by default. I am using the excellent Windows PowerShell ISE to edit my scripts. I have the following script:

4条回答
  •  北海茫月
    2020-12-29 01:36

    If your param($p) is not the first line in your script that can cause the Param error.

    Make sure your param($p) is the first line.

提交回复
热议问题