There are several options you can use. It's preferred to execute the commands with a commandprompt utility like powershell. Examples can be found on the internet, just google a bit.
You could also initiate a batchfile through a linked server using xp_cmdshell, but because you want to restart the SQL Engine the connection will be terminated and you will not know if the restart is succesfull.
** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **