Tuesday, January 17, 2017

Assign PSTN Conferencing add-on license for single user or multiple users

First of all, you need to buy PSTN Conferencing license. If you have E5 license, PSTN Conferencing will be part of the package. But if you run E3 license, then you need to buy PSTN Conferencing as an add-on.


This article will describe how to assign this add-on for a single user or multiple users.



You can assign this add-on in the Office365 Portal as well, but this article will explain how to do this in power shell


Download and install Microsoft Online Services Sign-In Assistant for IT Professionals RTW
Download and install Windows Azure Active Directory Module


Once you get the modules installed, use the Power Shell commands below to assign the license.



Start Windows Azure Active Directory-module



Type Import-Module MSOnline to import Azure Active Directory module into your PowerShell session



Type $credential = get-credential to enter administrative credential



Type Connect-MsolService -Credential $credential to establish Online Services connection to Azure Active Directory



Type Get-MsolUser -UserPrincipalName firstname.lastname@company.com | fl


In this example you will see that the user only have E3 license.




Type Set-MsolUserLicense -UserPrincipalName firstname.lastname@company.com -AddLicenses "company:MCOMEETADV"



Then run the Get-MsolUser again and you will see the new license assigned






The end user will now get a mail from Microsoft Online Services Team with this information.



The next time this user creates a Skype meeting, there will be information how to call in to this meeting from the phone.




If you want to enable this license for multiple users, Microsoft has created a script that can be used.


#Create a text file with a single row containing list of UserPrincipalName (UPN) of users to license. The MSOLservice uses UPN to license user accounts in Office 365.
#Example of text file:
#user1@domain.com
#user2@domain.com
#Import Module
ipmo MSOnline

#Authenticate to MSOLservice
Connect-MSOLService

#File prompt to select the userlist txt file
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
  $OFD = New-Object System.Windows.Forms.OpenFileDialog
  $OFD.filter = "text files (*.*)| *.txt"
  $OFD.ShowDialog() | Out-Null
  $OFD.filename

If ($OFD.filename -eq '')
{
Write-Host "You did not choose a file. Try again" -ForegroundColor White -BackgroundColor Red
}

#Create a variable of all users
$users = Get-Content $OFD.filename

#License each user in the $users variable
foreach ($user in $users)
    {
    Write-host "Assigning License: $user"
    #Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "companyname:ENTERPRISEPACK" -ErrorAction SilentlyContinue
    Set-MsolUserLicense -UserPrincipalName $user -AddLicenses "company:MCOMEETADV" -ErrorAction SilentlyContinue
    }



Save this text in red in a ConfAddOn.ps1 file.



Then create a file with UPN name of all the users you want to assign this license.



Run the ps1 file in Windows Azure Power shell



Type the admin credentials



Browse and then find the txt file with the users





You will finally see that the script adds the license to all the users in the txt file