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 "" -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 (, 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:




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







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