You’re not piping anything directly to Get-WmiObject, in that example. It’s Select-Object that accepts the pipeline input. When you use a constructed property, the Expression is a script block that gets executed for each of the input objects that Select-Object is processing (referred to by the $_ automatic variable inside the expression), and that script block’s return value is what gets assigned to the resulting property.
↧