Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Add Two PowerShell Arrays Together

$
0
0

Summary: Easily add two Windows PowerShell arrays together.

Hey, Scripting Guy! Question If I have an array stored in one variable, and another array stored in another variable, how can I add them together?

Hey, Scripting Guy! Answer 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

2

3

4

5

6

7

PS C:\>


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>