But your script removes the NIC and then adds a new NIC, you should be using the new NIC.
Do a Get-VMGuestNetworkInterface just before the Set-VMGuestNetworkInterface, don't use the old NIC (in $nice) that you removed.
Does that work ?
But your script removes the NIC and then adds a new NIC, you should be using the new NIC.
Do a Get-VMGuestNetworkInterface just before the Set-VMGuestNetworkInterface, don't use the old NIC (in $nice) that you removed.
Does that work ?