Skip to content

Instantly share code, notes, and snippets.

@Keithlr2
Created November 13, 2015 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keithlr2/21bfa0b44876d0ee6512 to your computer and use it in GitHub Desktop.
Save Keithlr2/21bfa0b44876d0ee6512 to your computer and use it in GitHub Desktop.
2015.11-ScriptingGamesPuzzle-Updated
param(
[parameter(Mandatory=$True)]
[string]$VMNameStr
)
$VMNames = ($VMNameStr.split(",")).Trim()|where-object {$_ -ne ""}
$VMNames | Foreach-object -Begin {$i = 0} -Process {set-variable -Name ("vmname" + $i) -value $_ ; $i++}
$VMNames
# Get-Variable -Include V* -Exclude "VerbosePreference"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment