Powershell script in Notepad works but not as .ps1