Manage Learn to apply best practices and optimize your operations.

Skype for Business Online PowerShell shortcuts for policy management

Administrators can tighten controls on the Skype for Business Online structure, adjust policies one user at a time or apply changes to an entire group with PowerShell.

Businesses of all sizes are moving to Office 365 for access to the cloud versions of Word and Excel as well as...

Skype for Business Online, formerly Lync Online. Like most Office 365 applications, the GUI isn't the only way to administer Skype Online. PowerShell is also an option. Here are some basic administrative tasks that you can perform with Skype for Business Online PowerShell cmdlets.

Some software is required to use Skype for Business Online PowerShell. First, download the Skype for Business Online Connector module. After installing the module, run this script to connect to the remote servers and download the cmdlets into the PowerShell session:

Import-Module LyncOnlineConnector

$cred = Get-Credential

$session = New-CsOnlineSession -Credential $cred

Import-PSSession $session

This script creates a remote session and imports the cmdlets from that session into a local session -- but only in memory. The benefit of this script is that it will always get the latest version of the module.

Track down policies for users

The first thing to do is find users and some of their information. The easiest way to display user properties is call a single user. The PowerShell command shown in Figure 1 will return one user:

Get-CSOnlineUser -LdapFilter 'Department=Dev' -ResultSize 1

Skype for Business Online user information
Figure 1. The Get-CSOnlineUser cmdlet displays information about users in Skype for Business Online.


The PowerShell display defaults to a list format to show all of the user's properties. The -LdapFilter property helps find users whose properties you want to modify. When looking at a list of a user's properties, some policies will be blank, as shown in Figure 2.

Blank Skype policies
Figure 2. The properties for some policies for a particular user in Skype for Business Online may show as blank.

The properties are blank because they have been inherited from either the user's site or from the global policy. Check available policies to determine what the global policy settings are with the following scripts, as shown in Figure 3:

Get-CsVoicePolicy | Format-table identity
Get-CsVoicePolicy -Identity Global

Get-CsVoicePolicy cmdlet
Figure 3. Administrators can use the Get-CsVoicePolicy cmdlet to find out what Skype for Business Online policies are available and what the global settings are.

Policies help collect settings that administrators can apply to individual users or to a group of users. For example, IT can create business policies for a branch office in one state, and another set of policies for offices in another state. Administrators then apply the policies to the users in those sites in Active Directory. When an administrator adjusts settings in those policies, the changes automatically apply to relevant users.

Use the following script to assign a different policy to a single user. But because we want to use PowerShell to manage groups of users as seamlessly as possible, the second script applies the correct policy to a group of users.

Grant-CsVoicePolicy -Identity 'TestUser2@adamTheAutomator.com' -PolicyName 'BusinessVoice'

Get-CsOnlineUser -LdapFilter 'Department=Dev' | Grant-CsVoicePolicy -PolicyName 'BusinessVoice'

To clear the policy setting from a user and return policies back to inheritance, run the same script but use $NULL for the -PolicyName parameter. This reverts the setting to the global policy.

To see what other policies administrators can manage in Skype Online, run this script:
Get-Command -Verb Grant -Noun *cs*policy*

Cramming for Skype for Business 2015 exams? Take this quiz.

Gearing up for a Skype for Business deployment? This quiz, covering some of the technical aspects of the unified communications platform, should help you get ready.

Give and restrict access to external messaging services

If users within an organization want to chat with people on other messaging services, admins can allow them to add users from other messaging services. After enabling the feature, set the external services that are allowed. Available services are WindowsLive, Yahoo and AOL. Use the example below to enable them all:

Set-CsTenantPublicProvider -Provider 'WindowsLive','Aol','Yahoo'

IT teams can also disable this feature using the Set-CsTenantFederationConfiguration cmdlet:

Set-CsTenantFederationConfiguration -AllowPublicUsers $true

Read more details about managing Skype for Business Online at this TechNet page.

Next Steps

The administrator's guide to manage Office 365 with PowerShell

Go on-premises or cloud with Office 365 telephony services

Manage Skype for Business call quality

VDI shops see boost thanks to improved Skype for Business

This was last published in December 2016

Dig Deeper on MS Office 365

PRO+

Content

Find more PRO+ content and other member only offers, here.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What some management shortcuts you use with Skype for Business Online?
Cancel

-ADS BY GOOGLE

SearchWindowsServer

SearchEnterpriseDesktop

SearchCloudComputing

SearchSQLServer

Close