Teams Powershell Module 0.9

Microsoft has just released the long awaited powershell module for Microsoft Teams in release 0.90 Beta. Administrators can now manage and automate their Microsoft Teams Teams πŸ™‚ using this Module.

The module is located at PowershellGallery.com, and below are the steps to install.

https://www.powershellgallery.com/packages/MicrosoftTeams/0.9.0

  1. Using powershell V5 it includes the PowershellGet Module which will connect to the PowershellGallery, here you can search and install modules.
  2. To search Powershell Gallery for Microsoft Teams type:
    Find-Module *Teams

  3. We’ve connected to the PowershellGallery.com and found that there is a module called MicrosoftTeams
  4. Save the Module to the location of your choice type:
    Save-Module MicrosoftTeams -Path C:\dev\MSTeams
  5. To install the downloaded module type:
    Install-Module MicrosoftTeams
  6. Once the module is installed lets see what cmdlets are available, there are a couple ways to do this:
    Get-Module MicrosoftTeams -ListAvailable | % { $_.ExportedCommands.Values }

    Or

    Get-Teamhelp
  7. Β It will populate the list of cmdlets:
  8. Ok now that we’ve got the module installed lets get connected, the module includes a connect cmdlet
    Connect-MicrosoftTeams
  9. Login to your Tenant with the appropriate privileges:
  10. Once you authenticate it will return your connection and tenant information
  11. Let’s run a few cmdlets to see what it brings up:
    PS C:\> Get-Team
    
    GroupId                              DisplayName Description
    -------                              ----------- -----------
    f1109f53-c77c-445c-a86e-e8f8a19fad49 Demo Team   Demo Team
  12. Creating a team is pretty straight forward see the below example although no verbose information is provided :
    PS C:\> New-Team -DisplayName 'Powershell Teams Team' -AccessType Private -Description 'First team created via powershell' -Verbose
    
    GroupId                             
    -------                             
    bc47094f-68b8-48e0-9ffa-23ac89e0b109

  13. Lets add a channel to the new Team:
    PS C:\> New-TeamChannel -GroupId 'bc47094f-68b8-48e0-9ffa-23ac89e0b109' -DisplayName 'Channel 1'
    
    Id                                   DisplayName Description
    --                                   ----------- -----------
    0dedb767-4d0f-495f-bcd2-041add2fa8a5 Channel 1

So as you can tell this can become very powerful when creating and managing multiple teams. The module is still in the early stages , hopefully in the next iteration it will include some additional features and policy management.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

RSS
LinkedIn
LinkedIn
Share