Vote count:
0
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.
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
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.
asked 58 secs ago
How to use function in Where-Object
Aucun commentaire:
Enregistrer un commentaire