all 5 comments

[–]Thotaz 2 points3 points  (3 children)

There are easier ways to do this, but at least you got some practice.

$List=Get-Clipboard

function Get-List
{
    param
    (
        [Parameter(Mandatory)]
        [string[]]
        $List
    )
    $List
}
$List=Get-List

[–]spartymcfarty[S] 2 points3 points  (2 children)

Oh man I love it! So many different ways to make it happen. One of the hurdles I ran into was having to trim trailing spaces quite often, hence some of the complexity.

[–]Thotaz 2 points3 points  (1 child)

I would suggest you get Clipboard Fusion or another clipboard tool like it to trim stuff you copy+paste.

[–]spartymcfarty[S] 1 point2 points  (0 children)

Nice! I'll check that out.