Powershell Create Function With Multiple Conditions