Bird
0
0

Which command correctly uses Get-Member to show only the methods of a process object?

easy📝 Conceptual Q2 of 15
PowerShell - Cmdlets and Pipeline
Which command correctly uses Get-Member to show only the methods of a process object?
AGet-Process | Get-Member -MemberType Event
BGet-Process | Get-Member -MemberType Property
CGet-Process | Get-Member -MemberType Method
DGet-Process | Get-Member -MemberType Alias
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct MemberType for methods

    Methods are actions an object can perform, so the MemberType should be 'Method'.
  2. Step 2: Match the command syntax

    The command uses Get-Process piped to Get-Member with -MemberType Method to filter only methods.
  3. Final Answer:

    Get-Process | Get-Member -MemberType Method -> Option C
  4. Quick Check:

    MemberType Method filters methods only [OK]
Quick Trick: Use -MemberType Method to list only methods [OK]
Common Mistakes:
  • Using Property instead of Method
  • Confusing Event or Alias as method types
  • Omitting the -MemberType parameter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes