Created
November 12, 2017 18:24
-
-
Save chaderoth/349e4d21753080cdeb6e32e6a1c03efc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################## | |
# Create Hash Table # | |
# Create All VMs In $NewVMs # | |
# Populate Hash Table with Id of Each VM Creation Task # | |
######################################################## | |
$TaskTable = @{} | |
foreach ($VM in $NewVMs){ | |
$TaskTable[(New-VM -Name $VM -Template $VMTemplate -VMHost $ESXiHost -Location $VMLocation -Datastore $VMDatastore -RunAsync).Id] = $VM | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment