I am quite new to Powershell and Powershell ISE but I am slowlying learning more and more by the day. I am working on a project where I generate a list of names in an array, powershell looks at each one individually, and if the name meets the proper criteria it outputs a message and then removes the name from the array. I then have the program loop to check the list again, until the array is empty, the foreach loop throws an error that the collection was modified cannot enumerate. I have heard that you cannot modify and then re read arrays like this. What are my options?
Thank you.