Powershell Script Block Scope In Javascript