simplify powershell script