You can make use of Win32ShutDown method in the Win32_OperatingSystem class to shut down the remote computer. You can have a timer set which would track the start up of the remote computer and shut down after the time is over.
To track the start time of a remote computer, use LDAP. Check the
lastLogonTimeStamp[
^] to get the login time. DirectorySearcher class will help you in getting that value.
IMO, instead of having a program running on one computer monitoring all the computers, have a simple application running on all the computers. This application should start at the log in and would shut the computer down after the allotted time is over.