To make a list of items or names unique, you could use grouping and then, when a group has more than one item, append a numbered suffix to these items. Here's a simple example: function Convert - Unique ( $list ) { $list | Group-Object | ForEach-Object...