Sometimes it will so be difficult to
search a line which it has the specific word or content using Ctrl+F in
the huge log file. Found out a easiest way that will very much useful
for our daily task
PS C:\Temp> dir .\Winstore.LOG | Select-String "Build"
If you want to search in multiple file
PS C:\Temp> dir .\Winsto*.LOG | Select-String "Build"
If you want to export the output to text file
PS C:\Temp> dir .\Winsto*.LOG | Select-String "Build" > Output.txt
Note: You can’t get output if you used Export-CSV cmdlet & this search can be done only notepad format files
No comments:
Post a Comment