Hello,
I'm using below source code to update VMs full and computer name.
List<VM> vms = refreshedVapp.GetChildrenVms();
foreach (VM vm in vms)
{
List<Task> tasks = refreshedVapp.Tasks;
if (tasks.Count > 0)
tasks[0].WaitForTask(0);
vm.GetResource().name = "name";
vm.UpdateVM(vm.GetResource()).WaitForTask(0);
GuestCustomizationSectionType guestType = vm.GetGuestCustomizationSection();
guestType.ComputerName = "name";
vm.UpdateSection(guestType).WaitForTask(0);
}
Unfortuntally I'm getting error "The parameter is not supported in the current context: DomainName". Don't you know how to solve this?
Thanks in advance!
Peter