PSItem

suggest change

Contains the object/item currently being processed by the pipeline.

PS C:\> 1..5 | % { Write-Host "The current item is $_" }
The current item is 1
The current item is 2
The current item is 3
The current item is 4
The current item is 5

$PSItem and $_ are the same automatic variable and can be used interchangeably, but $_ is by far the most commonly used. The $PSItem name was added in Windows PowerShell 3.0.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents