Can the following Nested foreach loop be simplified in PowerShell?
To give your task a name: You’re looking for the relative complement aka set difference between two arrays: In set-theory notation, it would be $ItemArray \ $ExclusionArray, i.e., those elements in $ItemArray that aren’t also in $ExclusionArray. This related question is looking for the symmetric difference between two sets, i.e., the set of elements that … Read more