PowerCLI-Example-Scripts icon indicating copy to clipboard operation
PowerCLI-Example-Scripts copied to clipboard

New-HVPool / Set-HVPool Network Settings Instant Clone Powershell Script

Open cradkins opened this issue 6 years ago • 8 comments

Good Morning,

We have a script that will create Instant Clone Desktop Pools in our environment. We're able to alter all of the settings within this script so far, with the exception of the Networks the pool uses. When you deploy an Instant Clone Pool manually, you can either have it default to use the Parent VM's Network, or you can choose as many networks that you want that pool to randomly pick from and assign to the VM's it creates.

Has anyone else run into this, and if so is there a way to use powershell to change the Network Setting within the desktop pool to randomly select from multiple networks?

I did see the -Nic Parameters for the New-HVPool:

-Nics <DesktopNetworkInterfaceCardSettings[]> desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.virtualCenterNetworkingSettings.nics.

I would imagine that I could do a Set-HVPool with the -key parameter to use the desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.virtualCenterNetworkingSettings.nics listed above. However, I guess my next question would be would this add multiple Network Cards to each VM, or would it just add multiple networks that the pool can choose from to assign to each VM?

cradkins avatar Feb 07 '19 16:02 cradkins