Forum Discussion

Kljaja82's avatar
Kljaja82
Copper Contributor
Mar 21, 2023

Teams devices - Configuration Profiles - PowerShell

Hi,

 

Is there any PowerShell module available that can list or assign configuration profiles on Teams Devices?

Thank you in advance.

 

Regards, 

  • Carl_Karawani's avatar
    Carl_Karawani
    Brass Contributor

    Kljaja82 There does seem to be an unpublished API to make changes programmatically to configuration profiles and apply them using 

     admin.devicemgmt.teams.microsoft.com/api/v2/configProfiles

    (This is in fact the API that the Teams Admin Center uses. )


    There's an interesting blog and sample script here where he shows how to programmatically bulk change 400 devices! 

    https://alexholmeset.blog/2021/12/18/teams-devices-configuration-profiles-uploader/

     

    This being said, I did a pretty deep comparison of using config profiles vs using vendor portals (such as YMCS for Yealink and PolyLens for Poly) and for now seems those portals offer more stability and options as well as API programmability to configure the IP phones. 
    https://easy365.io/remote-provisioning-of-yealink-phones-for-microsoft-teams-ymcs-vs-tac-configuration-profiles-ebc9fafa3b46

     

  • To get started, you'll need to install the MicrosoftTeams module by running the following command in PowerShell:

     

    Install-Module -Name MicrosoftTeams

     

    Once the module is installed, you can use the following commands to list or assign configuration profiles:

    To list configuration profiles on Teams devices:

     

    Get-CsTeamsIPPhonePolicy

     

    Get-CsTeamsIPPhonePolicy -Identity <ProfileName>

     

    To assign a configuration profile to a Teams device:

     

    Set-CsTeamsIPPhonePolicy -Identity <DeviceIdentity> -ProfileId <ProfileId>

     

    Where <DeviceIdentity> is the unique identifier for the device (such as its serial number), and <ProfileId> is the unique identifier for the configuration profile. You can obtain the ProfileId by running the Get-CsTeamsIPPhonePolicy command.

     

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily.

    • Kljaja82's avatar
      Kljaja82
      Copper Contributor

      eliekarkafy 

      Thank you for your fast response.

       

      Can you please post documentation and Module version because Google cannot find those commands.

      • I modified the commands in the above post, can you try please to use them and let me know if its works for you.

Resources