update
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<#
|
||||
.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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user