Power management is a big deal because turning off computers can save you company a lot of money. However, turning off a locked computer could cause a data loss. Finding out who is always locked is also important.
ShutdownIfLoggedOff.vbs will allow you to choose how to handles this. You can 1) Always logoff, even if a user is logged on, 2) Never logoff user. Send admin email, 3) Logoff user, send admin email, and 4) begin logoff, but allow user to abort. The mail send is SNMP, which can make some anti-virus programs complain.
You can run this with a scheduled job, PSExec, SMS/SCCM, but it must run locally with admin rights.