I\'ve written some pwsh code
\"a:b;c:d;e:f\".Split(\";\") | ForEach-Object { $_.Split(\":\") } # => @(a, b, c, d,
With foreach-object, it's usually useful to unwrap the array:
ps | foreach modules | sort -u modulename