Skip to content

Instantly share code, notes, and snippets.

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