Function Powershell Multiple Parameters While Loop