Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

how to get dnsDomain value from windows customization spec?

$
0
0

Hello, I wrote the below script and the goal is to get network related information from customization spec of window 64bits vm. I can get most of attributes set up in custom spec, such as: ip address, DNS server list etc, but NOT "dnsDomain"(it shows as null). The script for getting dnsDomain is underlined below. I also attach few screenshots of my customization spec which shows that dns domain is configured.

 

Can someone share the light on this issue?

 

Thanks,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var custspec = new VcCustomizationSpec();
var con = vm.sdkConnection;
var cms = con.customizationSpecManager;
var customSpecExists = cms.doesCustomizationSpecExist(specName);

if (customSpecExists) {
     var customSpecItem = cms.getCustomizationSpec(specName);
    custspec = customSpecItem.spec;
    var name = customSpecItem.info.name;
    } else throw "customspec not found";

 

var ip = custspec.nicSettingMap[0].adapter.ip.ipAddress;

var dnsServerList = custspec.nicSettingMap[0].adapter.dnsServerList;
dnsDomain = custspec.nicSettingMap[0].adapter.dnsDomain;
netmask = custspec.nicSettingMap[0].adapter.subnetMask;
gateway = custspec.nicSettingMap[0].adapter.gateway;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>