“Critically, there is no way to create a collection of the complete set of teams in a tenant. The Get-Team cmdlet, which you might assume is the way to fetch information about teams, does nothing more than return the set of teams that the currently signed in user belongs to.”
A year on, we have version 0.9.5 of the module and Get-Team can finally return a list of teams in a tenant (even if the documentation for the cmdlet hasn’t quite caught up).
Still Some Work To Do
However, as I report on Petri.com, some more work is needed to get the Get-Team cmdlet to where it would be really useful.
Today, you can create a list of teams in a tenant. This is good because it avoids the hoops and loops people went through to parse through the set of Office 365 Groups to find which groups are team-enabled. The cmdlet is fast, and that’s good too. But it gives away some of its speed by only returning three properties, which means that you’ll probably have to call other cmdlets to return information about individual teams.
The other big issue is a lack of filtering. PowerShell supports server-side and client-side filters. Server-side is always preferable because you have Office 365 do the work to find the right set of objects and return them to you for processing. Client-side means that the local workstation fetches the complete set of objects and then filters them to find the desired set. You might not see a great difference when your tenant is small and supports just a few hundred teams. Things get a lot more “interesting” when the number of teams grows larger and filtering becomes more important.
Support Custom Attributes
Another thing I’d like to see in Get-Team is some support for the custom attributes available for Office 365 Groups. These attributes are inherited from Exchange (but also exist for Teams) and they are very useful when you need to mark objects that have been processed so you don’t have to process them in the future. There are 15 single-value custom attributes and five multi-value custom attributes, which is more than enough to over-complicate things. And these attributes should be used for server-side filtering…
We cover Teams in great depth in Chapter 13 of the Office 365 for IT Pros eBook and then plunge into the details of using PowerShell to manage Office 365 Groups and Teams in Chapter 14. Naturally, you’ll find lots about Get-Team in Chapter 14.