2.5

Table Of Contents
VMware Lab Manager SOAP API Guide
58 VMware, Inc.
int configurationType = 1; //** Get workspace configuration
//**
//** Get array of all configurations
//**
LabManagerSoap.Configuration [] configurations =
binding.ListConfigurations(configurationType);
//**
//** Loop through all configurations.
//**
for (int j=0; j < configurations.Length; j++)
{
//**
//** Get array of all machines in configurations
//**
LabManagerSoap.Machine [] machines =
binding.ListMachines(configurations[j].id);
//**
//** Loop through all machines
//**
for (int i=0; i < machines.Length; i++)
{
//**
//** Check status—if machine is suspended, then resume it
//**
if (machines[i].status == 3)
{
binding.MachinePerformAction(machines[i].id, 4);
}
}
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}