Exporting custom list of Teams files into local drive and then delete the Teams?

EnterpriseArchitect
6,041
Reputation points
Hello people,
I need assistance and suggestions in exporting a list of Teams site file content to the local F:\Backup\Teams directory.
After a successful export/backup, the Teams site will be deleted.
How can this be accomplished using the PowerShell script? https://pnp.github.io/powershell/
Input Source: Teams-ToDelete.CSV
Group Name, Mail
ImportantGroup, ******@BigCompany.onmicrosoft.com
IT-Group, ******@BigCompany.com
Calendly-users, ******@MyCompany.onmicrosoft.com
All-Employees Teams, ******@MyParentCompany.com
Thank you, in advance.
Microsoft 365 and Office SharePoint For business Windows
11,682 questions
Windows for business Windows Server User experience PowerShell
Microsoft Security Microsoft Graph
13,721 questions
Microsoft Teams Microsoft Teams for business Other
10,904 questions
Sign in to answer