Powershell User Input Validation In C