From this link, in the second answer, i could run the commands. Plus i would like to add this command below in one script and export all the data to csv file.is that possible?
Connect-ExchangeOnline
Get-unified Group | Select Displayname, whenchanged
How to Office 365 Teams Get-Team and Get-Teamuser results export to CSV file