Using PowerShell to export a list of all the teams' owners and members
Sometimes, the click-intensive web experience of reviewing teams, owners, and members may not be ideal when working on analyzing and reporting Teams data for hundreds of teams simultaneously. While the previous recipe is great for looking into a few teams occasionally, this method of exporting all the teams' info is best for creating a snapshot in time for all teams. In this recipe, we'll export a CSV file with all the teams' data.
Getting ready
You must be a global or Teams administrator to complete the steps in this recipe. This script includes code to prompt you for credentials, as well as auto-install and a connection to the appropriate PowerShell modules, so no additional changes or configuration are needed to the script. You'll simply run the script as is, then sign in using modern authentication with your global admin or Teams admin credentials.
Note that this script is from...