<p>Is there any way to detect, through WSH, which workstations, in a windows domain, has a locked session?</p>

http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1115.mspx
If you scroll down, there is a check if computer is locked script on the page.  The script basically grabs the running processes for the machine and looks for the scrnsave.exe.
It is also worth noting that the author of this script states that he does not know of a foolproof way to determine if a computer is locked.  Hope this helps or at least points you in the right direction.