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:
Also had this "kind" of problem, but I couldn`t run any of my ps1 scripts.
Solution: Change encoding from UTF-8 (or which you have) to ANSI.
Perhaps it will help someone too.