Skip to content

Instantly share code, notes, and snippets.

@jbuenting
jbuenting / gist:cfab1272ece134f8283f
Created December 14, 2015 13:58
Powershell.org DEC 2015 Powershell Games
$list = @"
1 Partridge in a pear tree
2 Turtle Doves
3 French Hens
4 Calling Birds
5 Golden Rings
6 Geese a laying
7 Swans a swimming
8 Maids a milking
9 Ladies dancing
param([string]$VMNameStr)
# ----- split string on commas into array of names. Ignore if name length is 0
($VMNameStr -split ",").Trim(' ') | where length -ne 0