What does $_ mean inside a PowerShell pipeline?
Documentation: Microsoft Learn
$_ is the current pipeline object inside contexts such as Where-Object and ForEach-Object.
Interview · Question 3 of 34
Answer before reveal
Your draft
Write the answer you would give in an interview. The model answer stays hidden until you have drafted at least a short response.
A strong answer
$_ is the current pipeline object inside contexts such as Where-Object and ForEach-Object. Its available properties come from the object type being passed into that script block.
Show it concretely
Expect this follow-up
How would you discover which properties are safe to reference on $_?