Download and install the Microsoft Teams app using Intune

I was looking for an ‘easy’ way to push the Microsoft Teams app to devices using Intune.

Since the ‘Windows S’ Teams app is no longer available, the options were to either create a ‘Line of Business’ app in Intune or use Graph API. Both valid options, but – why?

Looking at the documentation to install Microsoft Teams using MSI, you can use System Center Configuration Manager, Group Policy or any third-party distribution mechanisms for broad deployment. As Intune falls into the latter, if you’re on a modern-managed environment – I prepared a script for that purpose.

The script will do the following:

  • Download the x64 MSI installer directly from Microsoft. (You can use the x86 MSI as well if you need)
  • Extract the installer to a folder on the client machine and run the installation quietly with the least possible privileges .

New-Item -ItemType Directory -Force -Path  C:\TeamsAutomation
Set-Location C:\TeamsAutomation
Invoke-WebRequest -Uri "https://aka.ms/teams64bitmsi" -OutFile "Teams_windows_x64.msi"
msiexec /i Teams_windows_x64.msi

Based on the default behavior of the installer, whenever a user signs into a new Windows User Profile, the installer will be launched and a copy of the Teams application will be installed in that user’s appdata folder. If a user already has the Teams app installed in the appdata folder, the MSI installer will skip the process for that user. So you can rest assure that the client doesn’t reinstall itself every time a user signs in.

Save the above script as a .ps1 file and upload in to Intune PowerShell:

In the Intune Devices Management Portal (https://aka.ms/apmgmt), go to Device configuration – PowerShell scripts and click to Add a new PowerShell script.

Provide a name and the location of the .ps1 file you created:

Upload Script

 

Click to configure settings, and make sure that both ‘Run this script using the logged on credentials’ and ‘Enforce script signature check’ are set to ‘No’:

Script Settings

Click ‘OK’ and ‘Create’ and assign the scripts to the device groups you desire.

Right after syncing, you’ll see the following events on your machine:

1040(1)

11707(2)

1033)3)

These will confirm that the installation was successful and users will be signed in to Teams automatically on the next log on.

 

 

 

 

 

 

Advertisements

Add Surface Hub and SRS Rooms to Microsoft Teams Meetings

(Or any room, as a matter of fact)

 

If you’re using Outlook and have the Teams Meeting add-on, you can schedule a Teams meeting and add a room to the meeting:

 

 

But if you try to schedule a meeting from Teams and look for a room to find its availability, you might face a challenge as Teams would not show any rooms:


 

Looking at the glass half full, this is a great opportunity to make some order in how users book rooms with Teams:

Teams takes advantage of Exchange’s New-DistributionGroup cmdlet -RoomList switch. The RoomList switch specifies that all members of a specific distribution group are room mailboxes.

You can create as many distribution groups as you need – based on any parameter that you want. In my scenario, I chose to create two lists:

  • One for rooms equipped with Surface Hubs
  • One for rooms equipped with Skype Room Systems.

This way my users will know which collaboration devices are available for them when they book a room.

Creation process of the distribution groups is easy.

Connect to Exchange Online:

$365Cred = Get-Credential
$365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $365Cred -Authentication Basic –AllowRedirection
$ImportResults = Import-PSSession $365Session

Create the new distributiobn groups with the -RoomList switch:

New-DistributionGroup -Name “Surface Hubs” -Roomlist

Add rooms to the distribution groups:

Add-DistributionGroupMember -Identity “Surface Hubs” -Member “SurfaceHub01"

Log back into your Teams client and see the new lists:


 

Choose the available room from the list:

 

 

And you’re all done:


 

The room is now booked. If you’re using a Surface Hub or a Skype Room System the meeting will be displayed on the device.


This post was originally posted on my TechNet blog: https://aka.ms/y0av.

Control how Skype for Business users join meetings

Had an interesting request lately, where a company wanted to control how users join meetings when they click the “Join” on their Skype for Business clients’ calendar tab or when they join Skype for Business meetings from Outlook.

In the client’s options, we have the ability to choose what happens when we join meetings; We can join immediately using the Skype for Business client or choose from four different phone numbers, all of which must be populated in our contact card, and can be seen under Tools -> Options -> Phones.
If your AD is configured right, you should have your Work phone (ideally your Skype for Business line URI), your Mobile phone, your Home phone and maybe even an additional ‘other’ phone.
You can also manually add phone numbers if they’re not automatically updated from AD.

Phones tabNow if you scroll down the tabs to “Skype Meetings”, this is where all the fun begins:

Meetings tab

In the tab above you can choose any of the numbers you have in the ‘Phones’ tab and get to choose whether you’d like to be prompted at the beginning of each meeting which device you’d like to use, or just go with what you chose.

How do you control it?

Like most things, the Registry.
You can make changes to the user’s preferences but not grey-out the options. If the users want to bypass the setting they can, but they’ll be defaulted to your setting at logon.

First, decide if you want the user to be prompted with each call. If yes, we need to tick the “Before I join meetings, ask me which audio device I want to use”.

The registry setting fro this checkbox is located at

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Lync

The key is

AllowOverridingDeviceAtJoinTime

If it’s set to 1 – it means the box is ticked and the user will be prompted to choose which device they’d like to join the meeting from.
If it’s set to 0 – it means the box is unticked, and the user will automatically join via the configured device.

Choosing a device is the next funny setting:
Same registry location as above, look for the following key:

JoinAudioConferenceFrom

The setting of the last binary bit is as follows, as reflected in the users’ “Phones” tab:

0 – Do not join Audio.
1 – The Skype for Business client.
2 – Work Phone (If different from your Skype for Business line uri).
3 – Mobile.
4 – Home.
5 – Other.

If one of the above is not configured or missing, the client will default to “Do not join Audio”.

For example, if I want to set my users to join from their mobile phones without being prompted, I’ll set the AllowOverridingDeviceAtJoinTime registry key to 0 and the JoinAudioConferenceFrom key to 3.

Registry settings

 

“The odd call drops” of the Mediation Server

I had a very annoying issue lately when an installation of a new gateway resolved in some calls (specifically to US numbers) dropped by the Skype for Business mediation server saying “A call to a PSTN number failed due to non availability of gateways.

The cause, according to the mediation server, was that “All gateways available for this call are marked as down“, and the resolution, surprisingly, was to “Verify that these gateways are up and can respond to calls.”

It seemed funny, because all other calls were successful, I have not exhausted the available PRI channels I had, the gateway didn’t seem to lose connectivity for a split second and SIP options are accepted and replied to on both ends.

Looking further at the Lync Monitoring Reports, I noticed the following:

Reported by Client
12000; reason=”Routes available for this request but no available gateway at this point”

Reported by Server
12000; reason=”Routes available for this request but no available gateway at this point”

I went to the gateway (AudioCodes M1000B) for answers and the logs were showing something very weird;

Every call starts with the same flow:

Flow1The mediation server sends a SIP Invite that will normally be answered immediately by the gateway with a “100 Trying”. This, for me, will close the deal on the “Gateway no responding” – this is a great response if you ask me.
The next phase would be the gateway immediately sending a “PSTN Place call” to the PSTN, hopefully receiving a “Proceeding” instantly from the PSTN, meaning so far we’re fully communicating. So for the time being I’m not really buying what the Lync mediation server is selling.

Looking further at the logs, I see the following strange behaviour:
As I’m still waiting for the PSTN to connect the call (this would normally be a “PSTN Call Alerting” message), I see that the mediation server decided to abandon ship!
This is what I see in the logs:

Wrong

Within 10 seconds after initiating the call, the mediation server will send a “Cancel” request to the gateway and will terminate the call:

19:25:49.640 [S=660986] [SID:1327438938] INVITE sip:+353857560598@10.10.10.1;user=phone SIP/2.0 
19:25:49.729 [S=661027] [SID:1327438938] SIP/2.0 100 Trying 
19:25:49.730 [S=661035] [SID:1327438938] (   lgr_psbrdif)(    656225)   pstn send --> PlaceCall
19:25:50.087 [S=661039] [SID:1327438479] (   lgr_psbrdex)(    656229)   pstn recv <-- CALL_PROCEEDING
19:25:59.020 [S=661055] [SID:1327438938] CANCEL sip:+353857560598@10.10.10.1;user=phone SIP/2.0 
19:25:59.052 [S=661061] [SID:1327438938] SIP/2.0 200 OK 
19:25:59.058 [S=661065] [SID:1327438938] SIP/2.0 487 Request Terminated 
19:25:59.079 [S=661074] [SID:1327438938] (   lgr_psbrdif)(    656265)   pstn send --> PSTNDisconnectCall

Clearly, the gateway is available and responding, but the mediation server is somewhat impatient.

Doing a bit of digging around, it appears there’s a setting for this.

The Lync mediation server is expecting a “SIP 180 Ringing” within 10 seconds of initiating the call. Failing to provide that (183 “Session in Progress” can be pushed here but that won’t benefit you if you’re still waiting for that ring…) will cause the mediation server to decide that the call didn’t respond and to mark the gateway as unavailable. A little too harsh? In my opinion yes. This will generate errors (2 per failed call) on your Lync servers and is actually a Lync self-inflicted error.

To work around this issue you can go to:
<Lync or Skype for Business installation folder\Server\Core
and look for a file called “OutboundRouting.exe.config“.
When you open that file, the first configuration line is:
<add key=”FailOverTimeout” value=”10000″/>
This actually determines how long should a call wait for the gateway until it declares it “Offline”. the value is in milliseconds, meaning the default setting is 10 seconds.

This will impact your environment if you have two or more gateways, and it means that it’ll take the mediation servers more than 10 seconds to declare that gateway as offline if it actually fails.

For me to workaround that issue I extended the wait time to 20 seconds, restarted the front-end and mediation services, and all of a sudden no call was dropped.

It appears it took the carrier approx. 12 seconds to generate the “PSTN Call Alerting” command to the gateway. For some reason, only calls to the US (and only with this specific carrier) were affected by this issue.

Now, I can see all my calls working perfectly and the errors have disappeared from the serves too.

Irish Public Holidays 2016 set for Skype for Business Server

New year, new holiday set.

This updated script will add all 2016 public holidays (and 2017 new years day) to your Skype for Business Server \ Lync 2013 Server environment as a holiday set.

Holidays in this script:

  • St. Patrick’s day.
  • Easter Monday.
  • Bank holidays for May, June, August, October.
  • Christmas day.
  • St. Stephen’s Day.
  • New years day 2017.

This will then become an option to tick on your response group workflows:

2016

The script can be downloaded here.

Skype for Business VCFG Viewer

When preparing documentation for a customer or trying to survey an existing deployment, I usually ask for a copy of the Voice Configuration files (.vcfg) of Lync \ Skype for Business to see how things are set up.

Currently there’s no option to view the vcfg file in a readable format.
Sure, you can open the vcfg file in a text editor or even a web browser and browse through the xml. Alternatively, you can import the configuration to your servers – but good luck trying to read it between the “Committed” and “Uncommitted” text.

The vcfg viewer is a “PowerShell executable” that runs through the vcfg file and renders it to a readable html file.
Simply run the ps1 file, choose the vcfg file you wish to open, and you’ll have a browse able page to examine the vcfg file:

Download the ps1 file here.

November 2015 update for Skype for Business and Lync 2013

Microsoft released an update for Skype for Business and Lync 2013.

The update resolves vulnerabilities in Microsoft Lync 2013 and Skype for Business as described in Microsoft Security Bulletin MS15-116 and Microsoft Security Bulletin MS15-123.

This security update also fixes the following issues:

Note that this update will upgrade your Lync 2013 client to Skype for Business.

*** The download link was removed by MS – I will update as soon as it’s available.

*** Update is available again.

Download (32-bit)

Download (64-bit)

Source: Microsoft