How can I make it so that when i click on command1 it will shut down the computer, AND when i click command2 it will restart? And if you know how to log-off that would also be helpfull(Log off of your windows session)

Thanks in advance.