Skip to main content
Skip to main content
Microsoft 365

Remote PowerShell for Lync Online

Tim Woo is technical product manager on the Skype team focused on Lync Online.

Since Windows PowerShell was released in 2006, administrators have fully embraced the scripting language for controlling and automating tasks in the Windows operating system and applications that run on Windows, including Lync.  In fact, Lync administrators have come to rely on PowerShell so much that as a product manager for Lync Online, one of the first questions I often get asked at events/conferences is:  “when is PowerShell coming to Lync Online?”

Well today, the Lync Online team is releasing remote PowerShell capabilities to all commercial Office 365 customers.

What can Office 365 admins do with the new Lync Online remote PowerShell?

Windows PowerShell is a command shell and scripting language that you can use to manage and automate aspects of Lync Online using a command-line instead of the browser based Office 365 admin center.

For example, to manage mobile phone notifications, also known as push notifications, you can use the Lync admin center.  Push notifications enable the service to send notifications about events, such as new instant messages or new voice mail, to mobile devices such as Windows Phones and iPhones.

With today’s release, you can enable and disable push notifications by using the remote PowerShell command Set-CsPushNotificationConfiguration cmdlet.  For example, the following command would disable push notifications for both iPhones and Windows Phones:

Set-CsPushNotificationConfiguration -EnableApplePushNotificationService $False -EnableMicrosoftPushNotificationService $False

In this example, you can use the Lync admin center or Windows PowerShell to enable or disable push notifications.  Both approaches work equally well, and you can now use your preferred interface.

Why Use PowerShell?

Of course, that brings up an obvious question: if the Lync admin center and Windows PowerShell provide the exact same functionality, why would someone choose to use one over the other?  For that matter, why would an administrator ever choose to type commands in Windows PowerShell rather than simply select and deselect checkboxes in the Lync admin center?

In a simple case such as the one just presented, the question regarding which approach to use comes down to personal preference: some people prefer using a graphical user interface while other people prefer using a command-line tool like Windows PowerShell.  At other times, however, Windows PowerShell provides the most efficient way to perform a management task.

For example, if you had to set policies for hundreds of individual users, it would be quite repetitive and tedious to select the options one by one in the Office 365 admin center.  With PowerShell, you can write a script with the appropriate cmdlets to automate this repetitive task and save yourself a lot of time.

In addition, there are instances where PowerShell cmdlets are the only way to perform a certain management task.

Additional Management Capabilities of PowerShell

As a general rule, any task you can carry out using the Lync Online admin center can also be carried out by using Windows PowerShell. However, there is additional functionality from PowerShell that goes beyond what is available in the Lync Online admin center.  The following are a few examples (not a comprehensive list) of functionality that can be controlled via PowerShell and not from the Office 365 admin center.

Managing Exchange Unified Messaging and hosted voicemail policies:


Managing meeting room endpoint devices with a Microsoft Exchange Server 2013 resource mailbox:


Granting client inband policies using pre-created policy instances. In this example, the following policy instance can be used to block saving of IMs and call logs in Outlook for all users:

Get-CsOnlineUser | Grant-CsClientPolicy -PolicyName Tag:ClientPolicyNoSaveIMNoArchiving

In addition to the Lync Online cmdlets, you can also utilize Exchange Online cmdlets to extend the capabilities of Lync Online reports beyond the currently available reports in the Office 365 admin center (your subscription must include Exchange Online for these to work):

Get-CsActiveUserReport (Active users)
Get-CsAVConferenceTimeReport (AV Conference minutes)
Get-CsP2PAVTimeReport (Total p2p audio minutes and total p2p video minutes)


For more information, please see the following:

— Tim Woo

You may also like these articles

Image for: Logo for the "Rise of the IT leader" infographic, with an arrow pointing upward.

The rise of the IT leader

Gain insights to help you become an IT leader.

Image for: Register for “GDPR: What you need to know” on Modern Workplace

Register for “GDPR: What you need to know” on Modern Workplace

Join us for the next episode of Modern Workplace, where we take a closer look at the global impact of the General Data Protection Regulation (GDPR) privacy law.

Image for: Register for “The Expert’s View: The future decoded” on the next Modern Workplace

Register for “The Expert’s View: The future decoded” on the next Modern Workplace

Take a closer look at innovation, collaboration and security trends to help organizations prepare for what’s ahead.