Extracting the specific content line from huge log file using PowerShell command

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


For Example: I want to search the line which hold the word “Build” in the text file winstore.log.

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

Select-String Powershell

Note: You can’t get output if you used Export-CSV cmdlet & this search can be done only notepad format files


About Raji Subramanian

Nothing great to say about me...Just want to share my knowledge for others that will be useful at any moment of time when they stuck in critical issue....
This entry was posted in Select-String Powershell and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s