Arrays of Strings

In PowerShell, you can multiply strings: the string is repeated which can be useful for creating separators:

'-' * 50

This works for words, too:

'localhost' * 10

You can create a text array by converting the text to an array by first wrapping it into @() before multiplying it:

@('localhost') * 10

Posted Dec 16 2008, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.