This is just a regular Windows Service. With TFS 2013 you just do:
net stop TFSBuildServiceHost.2013
net start TFSBuildServiceHost.2013
I assume it's similar for TFS 2012 (just find Visual Studio Team Foundation Build Service Host in your Services listing, go to properties and it will tell you the Service Name that you need to use from the command-line).