title: Optional command line args powershell
body: <p>I have a powershell script where I want to be able to bring up a <code>help</code> screen. So far it accepts 3 parameters <code>directoryURL</code> <code>loginprefix</code> and <code>validateOnly</code>.</p>
  
  <pre><code>param(
      [Parameter(Mandatory=$true)]
      [string]$directoryUrl,
  
      #[Parameter(Mandatory=$true)]
      [string]$prependedPermissions,
  
      #[Parameter(Mandatory=$true)]
      [string]$validateOnly
  );
  </code></pre>
  
  <p>What I want to check if someone types <code>-help</code> in the argument anywhere such as <code>.\scriptName.ps1 -help</code> it will be able to appear on the screen.</p>
  
  <p>How can I do that?</p>