Back
Office 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:

Get-CsHostedVoicemailPolicy
Grant-CsHostedVoicemailPolicy

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

Disable-CsMeetingRoom
Enable-CsMeetingRoom
Get-CsMeetingRoom
Set-CsMeetingRoom

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

Join the conversation

4 comments
  1. Tim:

    With the release of these CMDlets, it appears that you can configure Lync Online to accept more than just the default Public IM provider (Windows live). I successfully ran the CMDlet set-cstenantpublicprovider -tenant "guid" -publicprovider windowslive,yahoo without error. Further more, I confirmed the change made by running get-cstenant | select tenanted, public provider and received the following results…………………………….
    ———————————————————————–
    PS C:Windowssystem32> get-cstenant | select tenantid, publicprovider

    TenantId PublicProvider
    ——– ————–
    f4fa4ecf-5293-499e-be18-e2ff35f7a969 {WindowsLive, Yahoo}

    After 20 hours or so, My lync online organization cannot send/receive or detect presence from yahoo.

    Can you please tell me if this something that was intended to be configurable and is a supported feature of Lync Online? Thanks

    Andres

  2. Hi all As of I know Federation only support who have services with Microsoft , it doesn’t support other domain like yahoo, gmail , and org which domain is not Federated.
    We can only communicated with those whose domain is federated that may be depend upon your configuration how you wan to configure like only communicate with accepted domain or except block domain or all domain .

  3. Hi All As of I know Federation only support who have services with Microsoft , it doesn’t support other domain like yahoo, gmail , and org which domain is not Federated.
    We can only communicated with those whose domain is federated that may be depend upon your configuration how you wan to configure like only communicate with accepted domain or except block domain or all domain .

Comments are closed.