title: Better way of multiplayer IFs with PowerShell
body: <p>Im wondering if I am tackling this in the best way or if there is a better way of achieving my task.</p>
  <p>I've written a function in PowerShell which takes different parameters, but some of the parameters won't work together.</p>
  <p>So for example if I'm running the function and specifying a computerName parameter then I can't also pass list of multiple computer names.</p>
  <p>I know I can write multiple If statements as along the lines if If(($computerName) - and ($computerList)){Then write and error}</p>
  <p>but there are several parameters not just two, so do I need to do an if for each set of parameters someone could type in, or is there a better way of me tackling this?</p>
  <p>currently I have multiple Ifs like If $computerName -and !(log file) and $computerlist) then write an error etc.</p>