my test file looks like this:

```
aa
xxxxx test1 vraarxxxerv
remove1
remove2
remove3
must stay 1
aaaaaa
aaa
aaaaa
aaaaaaaa
aa
test2
remove1 efsd
remove2 esf 
remove3 gr rgsv
must stay 2
aaaaaa
aaa
aaaaa
aaaaaaaa
aa
xx test3
remove1 efsd
remove2 esf 
remove3 gr rgsv
must stay 3
aaaaaa
aaa
aaaaa
aaaaaaaa
aa

```

idea is simple - look for lines contains string test1, test2 and test3 and remove 3 next lines

my code is

```
 $search = 
'test1',
'test2',
'test3'

foreach ($item in $search) {
echo "."
$linenumber= Get-Content .\test.txt | select-string $item
$linenumber.LineNumber

Get-Content .\test.txt | Where-Object {
    -not ($_.ReadCount -ge $linenumber.LineNumber -and $_.ReadCount -le $linenumber.LineNumber+3) 
} | Out-File -FilePath .\test.txt

}

```

but it just create empty test.txt file - what am I doing wrong..? I would like to have file where remove1 remove2 and remove3 lines are not existing - they are always different so I cannot look for "remove" text, they are just an examples. must stay 1,2,3 lines are just to be sure that it haven't deleted more lines as I need...