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





























Wednesday, October 5, 2016

Skype for Business Hybrid with On-Premise PSTN.

As you may be aware, are PSTN Calling only available in US, UK, Puerto Rico, Spain and France (October 2016).
In this post I will try to explain how to move a user from On-Prem to Skype Online, and still use On-Prem PSTN.

Start Windows power shell as administrator
1.Import-Module skypeonlineconnector
2.$cred = Get-Credential
3.$Session = New-CsOnlineSession -Credential $cred -Verbose
4.Import-PSSession $session



















Yes you can create a script to make it easier. Save the text below in a ps1 file and then run.
Import-Module SkypeOnlineConnector
$session = New-CsOnlineSession -Credential $credential
Import-PSSession $session
Get-CsTenant | fl DisplayName

First you need to create a VoiceRoutingPolicy






New-CsVoiceRoutingPolicy -Identity "HybridVoiceRoutingPolicy" -Name "HybridVoiceRoutingPolicy" -PstnUsages "Long Distance"
If you have multiple usage, with multiple SIP Trunk, you need to add the policy like this
Set-CsVoiceRoutingPolicy -Identity "HybridVoiceRoutingPolicy" -PstnUsages  "SW - Sweden", "BU - Bulgaria", "DE - Germany", "DK - Denmark", "FI - Finland", "LV - Latvia", "UK - England", "US - USA"  ,"Long Distance"

Then you need to grant this policy to users thats need to be moved to Skype Online
Grant-CsVoiceRoutingPolicy -Identity user@company.com -PolicyName HybridVoiceRoutingPolicy



















Enable the Skype for Business Cloud PBX before you move the user to Skype Online
Run then a directory sync between local AD and Azure AS
The user must be enabled for enterprise voice with Line URI, Dial-plan and Voice Routing before you move the use.

Then it is ready to move the user from On-Prem to Skype Online.

If you run Get-CsOnlineUser -Identity user@company.com | fl *voice*, *line*, *dial* you will see that HostedVoiceMail and EnterpriseVoice is False.
Set-CsUser -Identity user@company.com -EnterpriseVoiceEnabled $true
Set-CsUser -Identity user@company.com -HostedVoiceMail $true

















You will see the EV users in the O365 portal like this















In Skype On-Prem Control panel will the user look like this.

Tuesday, September 20, 2016

Configure Skype Hybrid from Skype Online to Skype On-Prem

I know this is like swearing in church ... However, due to limited functionality in Skype Online as Persistent Chat, Enterprise Voice functionality, Common Area, Response Group, or that you want to have full control over your Skype environment, you want to set up Skype On-Prem.


Microsoft has documented very well how to configure Skype Hybrid by going from Skype On-Prem to Skype Online. But how to configure this in the other direction is not as well documented.


What if you have a customer running Skype Online already and want to use Skype On-Prem?
Yes, you start configuring Skype Hybrid in the usual way with ADFS Sync, DirSync, Federation with O365, Shared SIP address space etc.


Once you have set up Skype Hybrid, you expect to be able to see your Skype Online users Skype Control Panel?


Skype Online has not the same as function as Exchange Hybrid, which can write attributes back. Therefore, we first need to run an export of Skype Online users to csv file. Then we need to enable these users to Skype On-Prem.


I've created a script that retrieves users from Skype Online and puts them in a CSV file




Then start Skype On-Prem power shell and run a Enable-CsUser with parameter -HostingProviderProxyFQDN = sipfed.online.lync.com

After you run the import scripts, then Skype Online users be visible in Skype On-Prem Control Panel. You will now be able to move the users between Skype Online and Skype On-Prem