Understood on the guest os piece, I want to do 2 things, both customize within the os and also modify CPU/mem at somepoint in the deployment.
Technically could i replace this line?
New-VM -Name $vmname -template $basevm -Datastore $datastore -VMHost $vmhost -RunAsync | Set-VM -OSCustomizationSpec $custspec -Confirm:$false
With this:
New-VM -Name $vmname -template $basevm -Datastore $datastore -VMHost $vmhost -OSCustomizationSpec $custspec -RunAsync -Confirm:$false
Can i use the -base option with a template or does it actually have to be set as a VM?
Once all these are done, i could run another loop with set-vm and set cpu/mem. That should work right?