Powershell Custom Function Multiple Parameters While Loop