Saturday, May 23, 2015

Starting and shutting down Lync services using Powershell


The "Disable/Enable all Lync services" ones are especially helpful when the OS will need to be restarted a couple of times, and you don't want to deal with the hassle of waiting for the Pool/Windows Fabric to settle down first.


Get status - Get-Service | ? {$_.displayname –like “*Lync Server*”} | select status,displayname

Start all Lync services - Start-CSWindowsService

Stop all Lync services - Stop-CsWindowsService -Graceful

Disable all Lync services - Get-Service | ? {$_.displayname –like “*Lync Server*”} | Set-Service -StartupType disabled

Enable all Lync services - Get-Service | ? {$_.displayname –like “*Lync Server*”} | Set-Service -StartupType Automatic

2 comments:

  1. An alternate for your Get status command would be the Get-CsWindowsService which provides some additional information that can be useful.

    ReplyDelete
  2. Thank you for your comment. I agree that the Get-CSWindowsService would provide additional information, but this post is more about finding the status of all the different Lync "services" at the OS level; to see if they are actually running or not.

    You could just as well change the keyword to look at the status of Exchange or Sharepoint or Skype for Business or any other Windows services.

    ReplyDelete