www.vmwareadmins.com

how many VMs can you put in a box?

  • Increase font size
  • Default font size
  • Decrease font size
Home Articles Set Host Search Domain Using vOrchestrator

Set Host Search Domain Using vOrchestrator

E-mail Print PDF

Super easy in PowerCLI, but let's automate it!

Create  your new workflow, add a scriptable task, drop the following code in the script tab:

var netwrkSystemRef = Host.configManager.networkSystem;
var netwrkSys = VcPlugin.convertToVimManagedObject(Host , netwrkSystemRef);

var dnsConfigSpec = netwrkSys.NetworkConfig.DnsConfig;

dnsConfigSpec.SearchDomain = newSearchDomains;

netwrkSys.updateDnsConfig(dnsConfigSpec);

Create the following inputs:

 

then click on the visual binding tab, and connect them together:

connect your blocks, validate, and run!

 

 

 

Follow Me On...

Facebook linkedin twitter youtube