I work a lot in powershell, and I want to like it. It is built around good ideas.. but oof, every time I have to special case on a return value being either a list or a single item depending on the result-len==1 or not, I die a little inside.
I think there are some tricks to ensure a list in pwsh for these sort of operations. I vaguely recall ending variable assignments with a comma to avoid this.