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

PowerTip: Concatenate String Array with PowerShell

$
0
0

Summary: Use Windows PowerShell to concatenate elements of a array.

Hey, Scripting Guy! Question How can I use Windows PowerShell to concatenate the elements of a string array?

Hey, Scripting Guy! Answer Use the static Concat method from the String class, for example:

$a = "string a"

$b = "string b"

$arr = @($a,$b)

[string]::Concat($arr)


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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