Hi @Tobbe l
You can use a hash table for these sorts of things.
A hash table, also known as a dictionary or associative array, is a compact data structure that stores one or more key/value pairs.
Hash tables are frequently used because they are very efficient for finding and retrieving data. You can use hash tables to store lists and to create calculated properties in PowerShell.
-----
--If the reply is helpful, please Upvote and Accept it as an answer--