Bird
0
0

You want to list all running processes that use more than 50 MB of memory and export their names and IDs to a CSV file. Which PowerShell command achieves this?

hard📝 Application Q8 of 15
PowerShell - Basics and Environment
You want to list all running processes that use more than 50 MB of memory and export their names and IDs to a CSV file. Which PowerShell command achieves this?
AGet-Process | Where-Object { $_.Handles -gt 50MB } | Select-Object Name, Id | Export-CSV 'processes.csv'
BGet-Process | Where-Object { $_.CPU -gt 50000000 } | Select Name, Id | Export-Csv 'processes.csv'
CGet-Process | Where-Object { $_.WorkingSet -gt 50MB } | Select-Object Name, Id | Export-Csv -Path 'processes.csv' -NoTypeInformation
DGet-Process | Where-Object { $_.Memory -gt 50 } | Select-Object Name, Id | Export-Csv -Path 'processes.csv' -NoTypeInformation
Step-by-Step Solution
Solution:
  1. Step 1: Filter processes by memory usage

    WorkingSet property holds memory in bytes; '50MB' is a valid size literal in PowerShell.
  2. Step 2: Select required properties and export

    Select-Object picks Name and Id; Export-Csv with -NoTypeInformation exports clean CSV.
  3. Final Answer:

    Get-Process | Where-Object { $_.WorkingSet -gt 50MB } | Select-Object Name, Id | Export-Csv -Path 'processes.csv' -NoTypeInformation -> Option C
  4. Quick Check:

    Correct memory filter + export = D [OK]
Quick Trick: Use WorkingSet for memory in bytes; 50MB is valid size [OK]
Common Mistakes:
  • Using wrong property like Memory
  • Omitting -NoTypeInformation in Export-Csv
  • Using Select instead of Select-Object

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes