Powershell to get Owners of all Teams
Hello
We have 95k Teams.
I have a script that is running and works.
# Loop through the teams
foreach($team in $teamColl)
{
# Get the team owners
Get-TeamUser -GroupId $teamColl.GroupId -Role Owner | Select-Object $teamColl.GroupId,$owner.UserId,$owner.User | export-csv -encoding unicode -NoTypeInformation -path E:”Path”Report_Components_Owners.csv -append
}
But at the beginning is fetching all the informations previously to write it down.
Is there a possibility to write it at the fetching or avoid to read 95k Teams at once and then write it.
Regards
JFM_12
HelloWe have 95k Teams.I have a script that is running and works. # Loop through the teams
foreach($team in $teamColl)
{
# Get the team owners
Get-TeamUser -GroupId $teamColl.GroupId -Role Owner | Select-Object $teamColl.GroupId,$owner.UserId,$owner.User | export-csv -encoding unicode -NoTypeInformation -path E:”Path”Report_Components_Owners.csv -append
}
But at the beginning is fetching all the informations previously to write it down. Is there a possibility to write it at the fetching or avoid to read 95k Teams at once and then write it. Regards JFM_12 Read More