I posted this in a UDF named RemoteLRF.
RemoteLRS() - Remotely logoff/shutdown/reboot a computer

Please let me know of any problems.

Thanks