Just wondering why you decided to do the network setting after deploying the VM, any specific reason? If not, you can actually pass those paramters to the OScustomization spec so you wouldn't need to wait for the VM's to power on. Might be faster your deploys
Get-OSCustomizationSpec $custspec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddress $ipaddr -SubnetMask $subnet -DefaultGateway $gateway -Dns $pdns,$sdns