updated powershell script