There are likely many ways to do this including some fancy Powershell Scripts I’ve seen to do this but here is the easiest way I’ve found to restart all lync services running on a server. The nice thing is this will work on all Lync Server roles and you can do it in just two lines:
Get-CsWindowsService | Where-Object {$_.Status -eq "Running"} | Stop-CsWindowsService
Get-CsWindowsService | Where-Object {$_.Status -ne "Running"} | Start-CsWindowsService
Enjoy.