title: Determine if an array of PSCustomObject's contains an instance with a property value
body: <p>I need to determine if an array of <code>PSCustomObject</code>s contains an item with its <code>Title</code> property matching a value. I need a Boolean value for use with <a href="https://github.com/pester/Pester" rel="noreferrer">Pester</a> assertions:</p>
  
  <pre><code>$Items -&lt;function&gt; $Name | Should Be $True
  </code></pre>
  
  <p>Assuming:</p>
  
  <pre><code>$Items = @()
  $Items += [PsCustomObject]@{Title='foo';Url='http://f.io'}
  $Items += [PsCustomObject]@{Title='bar';Url='http://b.io'}
  </code></pre>
  
  <p><code>Contains</code> does not work:</p>
  
  <pre><code>PS&gt; $Items -contains 'foo'
  False
  </code></pre>
  
  <p><code>Match</code> returns the matching instance, but it is not a Boolean:</p>
  
  <pre><code>PS&gt; $Items -match 'foo'
  
  Title  Url
  -----  ---
  foo    http://f.io
  </code></pre>
  
  <p>I suppose I could:</p>
  
  <pre><code>($Items -Match $Name).Count | Should Be 1
  </code></pre>
  
  <p>Is there a better option?</p>