Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
powershell foreach pipeline objects
# This example changes name "frank" on pipeline objects to "francis"
$objList | foreach { if($_.name -eq "frank") { $_.name = "francis" } $_ } | sort name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment