Powershell While Loop Syntax Js