Acting on Each

Acting on Each: Doing Something to Each: ForEach-Object, Columns You Make Yourself: Calculated Properties.

Updated

  1. Doing Something to Each: ForEach-Object (Apprentice): ForEach-Object runs a script block once for every object the pipeline hands it, with $_ as this item, so one line can rename 200 photos, and -WhatIf goes inside the braces, on the command that makes the change, so you can rehearse first.
  2. Columns You Make Yourself: Calculated Properties (Journeyman): A calculated property is a column you add to Select-Object yourself, written as a hashtable with a Name for the heading and an Expression that works the value out for each object, such as a file's size in megabytes, rounded with [math]::Round.