Bird
0
0

What does the PowerShell cmdlet Select-String primarily do?

easy📝 Conceptual Q11 of 15
PowerShell - String Operations
What does the PowerShell cmdlet Select-String primarily do?
ACreates new text files with specified content
BDeletes files matching a pattern
CSearches for text patterns in files or command output
DLists all files in a directory
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of Select-String

    Select-String is used to find text patterns inside files or output streams.
  2. Step 2: Compare options with Select-String's function

    Only Searches for text patterns in files or command output describes searching text patterns, which matches Select-String's role.
  3. Final Answer:

    Searches for text patterns in files or command output -> Option C
  4. Quick Check:

    Select-String = Search text [OK]
Quick Trick: Select-String = find text inside files or output [OK]
Common Mistakes:
  • Confusing Select-String with file deletion commands
  • Thinking it creates or lists files
  • Assuming it modifies file content

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes