I made two assumptions in this answer:
- Lock and monitor are two different things. I assumed you mean lock to prevent them from fiddling with distracting programs during a lecture.
- You did not specify which OS the laptops run. I am guessing windows. If they are Macs, run GNU/Linux or anything else then please tell us.
As for the answer:
( Source: http://stackoverflow.com/questions/8800685/script-to-remote-lock-a-screen-under-windows-7 )
On the target computer run
If the computers are part of a domain then you should have the rights to do this. And (still assuming windows and many laptops) having the laptops in a domain is the only sane setup.
Once again: if this is not the case, tell us in the OP.
Also, please raise this issue with your local IT department. The proper way would be for them to solve it (and solve it for all lecturers in a very standardised way).