Summary

Completed

In this module, you've learned how to enumerate objects in the pipeline so that you can work with one object at a time during automation. The following are the key takeaways:

  • Enumeration is the process of performing a task on each object, one at a time, in a collection. If you want to run a method on many file objects, where no command provides the same functionality as that method, enumeration will help you accomplish this with a single command.
  • The ForEach-Object command that performs enumeration has a basic syntax and an advanced syntax. In the basic syntax, you can run a single method or access a single property of the objects that were piped into the command.
  • The advanced syntax for enumeration provides more flexibility and functionality than the basic syntax. Instead of letting you access a single object member, you can run a whole script. That script can include one command, or it can include many commands in sequence.