PowerTip: A Couple Quick PowerShell Array Tricks
Summary: Learn some quick tricks for using Windows PowerShell arrays.
How can I split the following string in the $a variable?
$a = “atl-ws-01,atl-ws-02,atl-ws-03,atl-ws-04”
Use the split method :
$b = $a.split(“,”)
How do I join an array, such as the one in the $a variable shown here?
$a = “h”,”e”,”l”,”l”,”o”
Use the join static method from the string c.