It must be obvious but I do not get it being fairly new in PowerShell, can anybody explain why I can not 'pipe' the outcome of the following commands further:
Get-Process | Where-Object { $_.ProcessName -match 'acc' } |
Select-Object -Property id, Name
This gives an out put as:
Id Name -- ---- 11744 MSACCESS
I would expect I can do the following:
Get-Process | Where-Object { $_.ProcessName -match 'acc' } |
Select-Object -Property id, Name |
write-host $_.name
or
Get-Process | Where-Object { $_.ProcessName -match 'acc' } |
Select-Object -Property id, Name | $_
I suppose I miss something here. Thx to all.