title: PowerShell functions that return true/false
body: <p>I am pretty new with using PowerShell and was wondering if anyone would have any input on trying to get PowerShell functions to return values.</p>
  
  <p>I want to create some function that will return a value:</p>
  
  <pre><code> Function Something
   {
       # Do a PowerShell cmd here: if the command succeeded, return true
       # If not, then return false
   }
  </code></pre>
  
  <p>Then have a second function that will only run if the above function is true:</p>
  
  <pre><code> Function OnlyTrue
   {
       # Do a PowerShell cmd here...
   }
  </code></pre>