I want to search files from the subfolder and grep row from the file. Text files have 3 rows, the expected result is grepping 2nd row. I hope the file name pass to Get-Content, but it failed.
Get-ChildItem -Name -Recurse -File -Include *.txt* | (Get-Content $_)[2]