Restarting SQL Server's services remotely programmatically
Please see http://technet.microsoft.com/en-us/library/hh403394.aspx - you missed for example PowerShell.

Pay extra attention if you're using a clustered instance.