Summary
Using the Windows PowerShell commands Get-Service, Set-service, Start-Service, Stop-Service, and Get-WmiObject provides administrators with a way to update, stop, start and view a list of all running and stopped services on a Windows server based computer. This also provides a convenient way to administer Lync Server services located on a Windows server based computer, when access to the local Lync Server Management Shell is not possible. Here's a step by step on how to remotely administer the Lync Server services using Windows PowerShell commands.
More Information
Requirements to perform remote administration of Lync Server services:
A Windows computer that is configured to support the Lync Server Administrative Tools
The Lync Server Role Based Access Control (RBAC) permissions that are needed to administer the Lync Server Management shell and Lync Server services
Use the following steps to launch the Lync Server Management Shell from the Windows Server console:
Using Windows Server 2012
A Windows computer that is configured to support the Lync Server Administrative Tools
- The Windows computer that is used to remotely administer the Lync Server service must meet the following hardware and software system requirements that are discussed in the following Microsoft TechNet articles:
The Lync Server Role Based Access Control (RBAC) permissions that are needed to administer the Lync Server Management shell and Lync Server services
- A user account that is a member of the Lync Server (RBAC) Windows Active Directory security group CsAdministrator
Note The CsAdministrator role has permissions to run all cmdlets
For more details on on Lync Server RBAC permissions review the following Microsoft TechNet article:
Role-Based Access Control
Use the following steps to launch the Lync Server Management Shell from the Windows Server console:
Using Windows Server 2012
- Press the Windows function key to access the Windows Start page
- Click on the Lync Server Management Shell tile
- Click on Start, All Programs, Microsoft Lync Server and then choose Lync Server Management Shell
- To list all Lync Server running and stopped services use the following Windows PowerShell command:
PS C:\Users\Administrator.CONTOSO>Get-Service -displayname *lync* - To stop or start a specific Lync Server service use either of these two Windows PowerShell commands:
PS C:\Users\Administrator.CONTOSO>Stop-Service -name RTCDATAMCU
PS C:\Users\Administrator.CONTOSO>Start-Service -name RTCDATAMCU - To stop or start all Lync Server services use either of these two Windows PowerShell commands:
PS C:\Users\Administrator.CONTOSO>Stop-Service -displayname *lync*
PS C:\Users\Administrator.CONTOSO>Start-Service -displayname *lync* - To troubleshoot the status of a specific Lync Server service use the following PowerShell command:
PS C:\Users\Administrator.LAB277056> get-wmiobject win32_service | where-object {$_.Name -eq "RTCDATAMCU"}
Note The following information will be returned to the Lync Server Management Shell console
ExitCode : 0
Name : RTCDATAMCU
ProcessId : 7292
StartMode : Disabled
State : Stopped
Status : OK - To change the StartMode of a specific Lync Server service type in the following PowerShell command:
PS C:\Users\Administrator.LAB277056>set-service -name RTCDATAMCU -startuptype Automatic
For detailed information on using the Windows PowerShell commands for Windows Server service management review the following Microsoft TechNet article:
Windows PowerShell Management Cmdlets