Quantcast
Viewing all articles
Browse latest Browse all 3333

PowerTip: Combine Arrays in PowerShell

Summary: Learn how to combine two arrays in Windows PowerShell.

Image may be NSFW.
Clik here to view.
Hey, Scripting Guy! Question
 How can I use Windows PowerShell to combine two arrays stored in two different variables?

Image may be NSFW.
Clik here to view.
Hey, Scripting Guy! Answer
 Use the + operator, for example:

 [array]$a = @('a','b','c')

 [array]$b = @(1,2,3)

 [array]$c = $a + $b

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 3333

Trending Articles



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