Returning a collection of unique elements: List using Contains() or HashSet
Checking if an item exists in a list or a hashset has very different order of complexity:


\$O(N)\$ in a list: all items are checked one by one until a match is found. If no match, the entire list will be scanned
(amortized) \$O(1)\$ in a hashset: calculate hashcode, check if it exists


With today's computers, the performance with ~25 elements should be virtually the same. Even if you had a 1000 elements, you might still not notice a difference. If in doubt, measure it.

Note that converting the list to a hashset would have the consequence of losing the ordering. An alternative could be a SortedSet, if you don't mind sorting instead of ordering. For a data structure that preserves ordering and the time complexity of hashset operations, you could consider a linked hashset implementation discussed for example here.

To conclude, if you know you will only ever have few entries (&lt; 1000),
the performance difference won't be noticeable.
However, as a matter of principle, it might be a good idea to use a hashset anyway, especially if you don't care about the order of entries.
A sorted set would be even better, to have consistent ordering, and fewer surprises.



You use the boolean literal false at many places, for example:


if(IncludeSystemAccounts.IsPresent == false)
{
    users = users.Where(user =&gt; user.IsSystemObject == false);



It's more natural to not use boolean literals like this, but write instead:

if (!IncludeSystemAccounts.IsPresent)
{
    users = users.Where(user =&gt; !user.IsSystemObject);