Microsoft Teams|Office|Office 365|PowerShell

Teams PowerShell Module Generally Available (At Last)

Teams PowerShell

Slow Progress to 1.0

The Teams PowerShell module first appeared in March 2017. At the time, I wasn’t too impressed because the module was kind of odd in its approach and didn’t do a great job of managing teams. Over time, Microsoft updated the module (far too slowly for some) to a point where the preview versions 0.9.5 and 0.9.6 offered reasonable functionality.

For much of the time, progress with the module was gated by work Microsoft did on the Teams Admin Center. Invariably, soon after Microsoft upgraded the portal (for example, to manage teams in September 2018), a new version of the PowerShell module appeared. Now Microsoft has released the 1.0 version of the module, or the first “generally available” version. The new module includes some cmdlet changes that might force updates for scripts.

Installing Teams PowerShell 1.0

To get the new module, first make sure that you uninstall any of the older versions from your workstation:

Uninstall-Module MicrosoftTeams

Then, install the V1.0 release from the PowerShell Gallery:
Install-Module MicrosoftTeams -Repository PSGallery

Finally, connect to Teams with an administrator account (if you want to work with all the teams in the tenant) or a user account (to work with teams owned by that account).
Connect-MicrosoftTeams

At this point, if you check the module, you should see it report the correct version:
Get-Module |?{$_.Name -eq "MicrosoftTeams"}|Select Name, Version

Name           Version
----           -------
MicrosoftTeams 1.0.0

Sponsored Content

Maximize Value from Microsoft Defender

In this ebook, you’ll learn why Red Canary’s platform and expertise bring you the highest possible value from your Microsoft Defender for Endpoint investment, deployment, or migration.

Get-Team and Filtering

The big changes in the V1.0 module are in the Get-Team cmdlet. First, Get-Team supports basic filtering capabilities. Get-Team can return a set of teams:

Owned by someone: specify the User parameter and pass the user’s email address:

Get-Team -User [email protected]

Archived (read-only): specify the Archived parameter and set it to $True to return a set of archived teams or $False to see a set of teams that are not archived.
Get-Team -Archived $True

Access (public or private): specify the Visibility parameter and set it to Public or Private to retrieve the teams you want:
Get-Team -Visibility Public

You can combine the parameters too:
Get-Team -Visibility Private -Archived $True -User [email protected]

While you retrieve sets of teams with Get-Team, two issues become painfully apparent. First, the cmdlet is slow. Second, the filters are client-side rather than server-side and don’t support the kind of filtering functionality that you might be accustomed to with cmdlets like Get-Mailbox. For instance, wildcard matching is unsupported.

This won’t be a big deal when you only work with a few teams, but it becomes a much bigger problem as the number of teams mounts into the hundreds or thousands.

Microsoft acknowledges that performance isn’t what it should be, and we can hope for improvements in the future. Unfortunately, the Get-UnifiedGroup cmdlet (often used to retrieve information not returned by Get-Team) is a sloth of a cmdlet too. The net is that we have plenty of time to drink coffee.

Simplification and Consolidation in Team Settings

The original version of Get-Team returned just a few properties for a team. With this release, Microsoft has deprecated several subsidiary cmdlets into Get-Team so that the one cmdlet can return all the settings related to a team. For example, you don’t have to run Get-TeamGuestSettings to find out what guest users can do in a team or Get-TeamFunSettings (an excellent name) to return the settings controlling the use of GIFS and stickers in chats. This change and the associated change to Set-Team to set values for team settings might mean that you need to update scripts.

Here’s what the full set of properties returned for a team looks like:

Get-Team -GroupId de797c44-d998-4682-b1e0-aa938cfc05a8 |Format-List

GroupId                           : de797c44-d998-4682-b1e0-aa938cfc05a8
DisplayName                       : Forza Roma
Description                       : Rome at its best
Visibility                        : Public
MailNickName                      : ForzaRoma
Classification                    :
Archived                          : False
AllowGiphy                        : True
GiphyContentRating                : moderate
AllowStickersAndMemes             : True
AllowCustomMemes                  : True
AllowGuestCreateUpdateChannels    : False
AllowGuestDeleteChannels          : False
AllowCreateUpdateChannels         : True
AllowDeleteChannels               : True
AllowAddRemoveApps                : True
AllowCreateUpdateRemoveTabs       : True
AllowCreateUpdateRemoveConnectors : True
AllowUserEditMessages             : True
AllowUserDeleteMessages           : True
AllowOwnerDeleteMessages          : True
AllowTeamMentions                 : True
AllowChannelMentions              : True

As mentioned above, the Set-Team cmdlet now can control all the settings previously set in cmdlets like Set-TeamGuestSettings. For example:
Set-Team -GroupId de797c44-d998-4682-b1e0-aa938cfc05a8 -AllowGuestCreateUpdateChannels $True

Other Cmdlets

The 1.0 module does not change how the cmdlets to work with users (Add-TeamUser), channels (New-TeamChannel) or managing teams (New-Team, Remove-Team) work. All existing scripts should work just fine with the new module, part from one known bug where a classification cannot be set with the New-Team or Set-Team cmdlets (Microsoft expects to fix this problem soon).

The Connect-MicrosoftTeams cmdlet now supports the ability to specify the kind of Teams environment a tenant is located in. If you don’t use one of the sovereign clouds, you can forget about this and use Connect-MicrosoftTeams without passing the TeamsEnvironmentName parameter.

Future Developments

Critical parts of the V1.0 of the Teams PowerShell module are too slow for my liking, but apart from that, the module is solid. From this point on, Microsoft plans to keep two versions of the Teams PowerShell module available. The Generally Available version is intended for production use while the Preview version is for early access to updated or new cmdlets. The division between the two versions reflects the fact that Microsoft has GA and beta versions of the Graph endpoints for Teams.

The next thing Microsoft needs to do is to combine the old Skype for Business Online module (used for managing policies and other org-wide settings) with this module. A single consolidated module with some extra speed would be a nice announcement at Ignite 2019.

 

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (5)

5 responses to “Teams PowerShell Module Generally Available (At Last)”

  1. <p>Hi,</p><p>Get-Team is not working as you have shown above with msolgroup id</p><p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAB3CAYAAAA6lG4WAAAgAElEQVR4nO2dv47cRtLAeS/g0PgSZ0qECR05NAwYdiYY2M0uMHCAAsGAz5GcEfiiTf0CAk7ZPIAzpUqcrvwBfoc73Bv0F+z0bLGmqvoPOUPO7i/4Qdohu7u6qthdxW6Sw6dPn9L//O//pWEYXP724hYAAAAAAGCTDCQ1AAAAAABwzZDUAAAAAADAVUNSAwAAAAAAV80xqVlbEAAAAAAAgB5IagAAAOBKuEvv/v0hvVpdDgDYGiQ1AAAAcCWQ1Jh8v0uf0pD2P21AFoCVEEnNXXr37/+m/wjevRYnf/s+fZTH93fVjbzaB/Wa/Jze/vFnevutXddJ+dcfDvL8nN7+MW3rKOdB/seyD+e+e30oP+m7GjBV33MdsSyRzvz+nY+lJwKta9Uf2fc/3qeXi7T5XRr/GlJKmc/S+H1Nua/SPn2Rblva+ukL0U5re5fm7+nrf45pHDO/pq+/3IIcYxp//Idz7j/S7fhL2tXWLa/RJn9Sfrq/M673yjp7y724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FPTZI1PtHWoAAPAhqTkTLftX02BnvQDD0L4XGuaxpcCXpObp9rX3AW4AALAhqQEAAAAAgKvmrElNb+UAAAAAAADnhqQGAAAAAACuGpIaAAAAAAC4akhqAAAAAADgqiGpAQAAAACAq4akBgAAAAAArhqSGgAAAAAAuGpIagAAAAAA4KohqQEAAAAAgKuGpAYAAAAAAK4akhoAAAAAALhqSGoAAAAAAOCqIakBAAAAAICrhqQGAAAAAACummNSs7YgAAAAAAAAPZDUAAAAAADAVUNSAwAAAAAAV83/A9WGFJ7yI7TTAAAAAElFTkSuQmCC"></p><p><br></p>

    • <blockquote><em><a href="#16243">In reply to [email protected]:</a></em></blockquote><p>I also see problems / slow performance with Get-Team. Before I could get a list of all Teams fast with Get-Team. Now it takes 20-30 seconds for it to return the list. Searching for a specific Team gives me an error.</p><p>But still, it works better han the last (beta) version.</p>

      • <blockquote><em><a href="#16245">In reply to redlobsterfun:</a></em></blockquote><blockquote><br></blockquote><blockquote><em>The speed issue is known and is being worked on. I expect an update to the 1.0 module will help.</em></blockquote><p><br></p>

    • <blockquote><a href="#16243"><em>In reply to [email protected]:</em></a><em> </em></blockquote><blockquote><em>Get-Team works with the Group Id. It always has.</em></blockquote><blockquote><br></blockquote><p>get-team -GroupId fa2df322-bc13-4e41-8f62-e2e21e6a09e3</p><p><br></p><p>GroupId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayName&nbsp;&nbsp;&nbsp;&nbsp;Visibility&nbsp;Archived&nbsp;MailNickName</p><p>——-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;———–&nbsp;&nbsp;&nbsp;&nbsp;———-&nbsp;——–&nbsp;————</p><blockquote>fa2df322-bc13-4e41-8f62-e2e21e6a09e3 Operations Revi… Private&nbsp;&nbsp;&nbsp;False&nbsp;&nbsp;&nbsp;OperationsRevie…</blockquote><p><br></p>

  2. <p>Hi Tony thanks for all your helpful posts! I have a common scenario where I'd hope Teams Powershell could help but I'm struggling.</p><p><br></p><p>An employee leaves and we want to remove them from all Teams whilst keeping their mail account open a while. I find that Get-Team -User [email protected] is returning very incorrect results so I cannot even see what Teams they are in. Do you know why that could be? Also even attempting to remove them from all Teams with PS hits a few issues such as when they are the sole owner (or the sole owner and sole member) – what happens if they are removed from these Teams? And what happens if the Office 365 account is just deleted). Right now I just reset their password and log in and manually remove them (laborious but neat). </p>

Leave a Reply

Tony Redmond has written thousands of articles about Microsoft technology since 1996. He covers Office 365 and associated technologies for Petri.com and is also the lead author for the Office 365 for IT Pros eBook, updated monthly to keep pace with change in the cloud.
External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by:

 
Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: