c:\command > c:\txtfile.txt
c:\powershell
<PS>c:\Get-Content c:\txtfile.txt | Select-String -Pattern <String your interested in finding> -Context 2,4
Context 2,4 means 2 lines above, and 4 lines below the string pattern found.
Super useful trick.
Everything IT
c:\command > c:\txtfile.txt
c:\powershell
<PS>c:\Get-Content c:\txtfile.txt | Select-String -Pattern <String your interested in finding> -Context 2,4
Context 2,4 means 2 lines above, and 4 lines below the string pattern found.
Super useful trick.