title: PowerShell Custom Order Sorting
body: <p>I have a simple script that runs a cmdlet of a 3rd party application and outputs a table with 3 columns - <code>Name</code>, <code>Result</code>, <code>JobName</code>. <code>Result</code> only contains one of three values: <code>Success</code>, <code>Warning</code>, or <code>Failed</code>. </p>
  
  <p><strong>Output</strong>:</p>
  
  <pre><code>Name      Result   JobName                          
  ----      ------   -------                          
  server1   Success  servers-A            
  server2   Success  servers-A            
  server3   Warning  servers-A            
  server4   Success  servers-A   
  server5   Warning  servers-B            
  server6   Success  servers-B            
  server7   Failed   servers-C            
  server8   Failed   servers-C   
  </code></pre>
  
  <p>What I'd like to do is sort the table by the <code>Result</code> column but in the following custom order (order of importance): <code>Failed</code>, <code>Warning</code>, then <code>Success</code>. </p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>Name    Result  JobName    
  ----    ------  -------                      
  server7 Failed  servers-C            
  server8 Failed  servers-C
  server3 Warning servers-A            
  server5 Warning servers-B            
  server1 Success servers-A            
  server2 Success servers-A            
  server4 Success servers-A   
  server6 Success servers-B
  </code></pre>
  
  <p>How can this be achieved? </p>