Hello Folks,
I am trying to apply Host profiles to my new ESXi before adding it in to production cluster
with the below peace of code i able to pull the host profiles from my vCenter and able to associate the host profile to my new Esxi host.
var vCenterName = HostName.sdkConnection;
var vCProfile = vCenterName;
for each (var profile in vCProfile.hostProfileManager.profile) {
System.log("Profile Name :" + profile.name);
if (profile.name == "profile-Prod") {
var array1 = [];
array1.push(HostName)
profile.associateProfile(array1);
}
I facing a issue in finding the right object to apply host profile to my Esxi host. it will be a great appreciated ....