Bird
0
0

Which parameter of Select-String specifies the file to search in?

easy📝 Conceptual Q2 of 15
PowerShell - String Operations
Which parameter of Select-String specifies the file to search in?
A-Path
B-Pattern
C-InputObject
D-CaseSensitive
Step-by-Step Solution
Solution:
  1. Step 1: Identify parameter roles

    -Path tells Select-String which file(s) to search.
  2. Step 2: Differentiate from other parameters

    -Pattern is the text to find, -InputObject is for strings, and -CaseSensitive controls matching case.
  3. Final Answer:

    -Path -> Option A
  4. Quick Check:

    File parameter = -Path [OK]
Quick Trick: Use -Path to specify files for Select-String [OK]
Common Mistakes:
  • Using -Pattern to specify files
  • Confusing -InputObject with file input
  • Assuming -CaseSensitive selects files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes