title: How can I set a powershell script to only show short error descriptions
body: <p>Is there a way to get only the error message when displaying error descriptions while running a script?</p>
  
  <p>I have a script that runs, and when an error occurs, I get error messages at various times, for example, if I don't pass a parameter to a function I wrote, I'll get:</p>
  
  <pre><code>    No Setup Location specified (i.e. \\server\share\folder)
  At \\server\share\folder\script.ps1:9 char:31
  +     [string] $setupHome = $(throw &lt;&lt;&lt;&lt;  "No Setup Location specified (i.e. \\server\share\folder)")
      + CategoryInfo          : OperationStopped: (No Setup Locati...ojects\something):String) [], RuntimeException
      + FullyQualifiedErrorId : No Setup Location specified (i.e. \\server\share\folder)
  </code></pre>
  
  <p>This is fine, but what I'd like is to be able to set a preference (like ErrorAction) that only will show me the error message, and not all of the extra goo that is nice to have, but clutters up my console.  So instead of the above, I'd like to only see that first line:</p>
  
  <pre><code>No Setup Location specified (i.e. \\server\share\folder)
  </code></pre>