What does the PowerShell cmdlet <code>Select-String</code> do?Select-String searches text or files for patterns, like the 'find' command. It helps find lines that match a word or phrase.
log.txt using Select-String?Use: Select-String -Path log.txt -Pattern 'error'. This shows all lines with 'error' in the file.
-CaseSensitive parameter do in Select-String?It makes the search match only exact letter cases. For example, searching 'Error' won't find 'error' if -CaseSensitive is used.
Select-String?Use wildcards in the -Path parameter, like Select-String -Path *.txt -Pattern 'warning' to search all text files.
Select-String provide when it finds matches?It shows the file name, line number, and the matching line of text. This helps you quickly find where the pattern appears.
Select-String?-Path tells Select-String where to look (files or text). -Pattern is what to search for.
Select-String search case-sensitively?-CaseSensitive makes the search respect letter case.
Select-String output when it finds a match?The output shows file name, line number, and the full line containing the match.
Select-String?*.txt matches all files ending with .txt.
-Pattern parameter?-Pattern tells Select-String what text or pattern to look for.
Select-String to find a word in multiple files and what output you expect.-CaseSensitive parameter in Select-String.