Lab management’s public interface is exposed at both web service layer and at the client SDK layer.
The SDK can be used to script a bunch of stuff. To pen down a few :
Here is a sample (attached the same) which will query for all active environments in a particular team project and delete the environments which were not accessed during last 30 days.
Few things to note :
Example: In the above example, there is a wait to ensure that the environment delete operation is complete.
To get the computer name of a virtual machine use, "ls.ExtendedInfo.RemoteInfo.ComputerName".
Hope you find it useful. Thanks !