<# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE $servers=@" server1.xyz.com servers2.xyz.com @" $servers = ConvertTo-Array -MultiLineString $servers .EXAMPLE Another example of how to use this cmdlet #> function ConvertTo-Array { [CmdletBinding()] Param ( [string] $MultiLineString ) Begin { } Process { $result = @($MultiLineString -split '[\r\n]+') } End { return $result } }