Restart Team Foundation Server AT using command line
In order to restart the TFS app tier, you can run these commands on the AT itself:
%windir%\system32\inetsrv\appcmd recycle apppool /apppool.name:"Microsoft Team Foundation Server Application Pool"
net stop tfsjobagent
net start tfsjobagent
You can download the ready-to-use script file here.
Note: You need to run this script as administrator.