Using the ForEach Object. Changing the Type of parameters passed to the object so that the command will work.