Learn about Windows PowerShell
Summary: Easily add two Windows PowerShell arrays together.
If I have an array stored in one variable, and another array stored in another variable, how can I add them together?
Use the + operator to add to arrays together:
PS C:\> $a = 2,3,4
PS C:\> $b = 5,6,7
PS C:\> $c = $a + $b
PS C:\> $c
Missing from this is the related question of how to do this with distinct results, similar to the SQL "Select Distinct" command. i.e, if both of the above lists contained "1", how do i return a list that contains "1" only once.
$c = $a + $b | select -uniq