title: How to use function in Where-Object
body: <p>I want filter a list of objects by property "innerText". But I need to do some preparations.
  Why furhter code doesn't works? It returns all objects. </p>
  
  <pre><code>function enc[[string]$inp]
  {
      return [System.Text.Encoding]::GetEncoding("windows-1251").GetString([System.Text.Encoding]::GetEncoding("ISO-8859-1").GetBytes($inp))
  }
  
  $req.Links | Where-Object { enc($_.innerText) -eq "my string"} | fl
  </code></pre>
  
  <p>What I'm doing wrong?
  Unfortunately I didn't find the necessary article in the Internet.
  There are a lot of such examples: ($_.Name -eq "name") - and nothing valueable for me.</p>