Blocking access to a lab after the course has ended.

New Contributor



Is there a way to prevent "User" from accessing the lab after a certain date?


We must keep assignments for a certain amount of time so we can't delete the labs immediately after the course ends. We are looking for a way to prevent the students from returning to their VMs and modifying their assignments.


I thought about changing the VM's password, but doing that one machine at a time is time-consuming. Is there any better way, or any way at all, to achieve this? 






1 Reply
best response confirmed by masih-shek (New Contributor)



You could set the quota for all students to 0 hours and make sure there are no further scheduled time. (, This would prevent students from accessing the VM because they will be out of quota/homework/async time to use the VM.  *If* later need to access the VM, you can then reset the password and access using the virtual machine pool page.


If you want to automate this, there are several SDKs including one for .NET, SDK, or you can call the REST APIs directly.


Hope that helps,