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:
If your param($p) is not the first line in your script that can cause the Param error.
param($p)
Make sure your param($p) is the first line.