This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$csvFile = "C:\temp\teamslist.csv" | |
#List of team object IDs. Header in CSV is ID. | |
$table = Import-Csv $csvFile -Delimiter "," | |
$source = Connect-Tenant -Domain skienkommune.onmicrosoft.com -Browser | |
$destination = Connect-Tenant -Domain admskien.onmicrosoft.com -Browser | |
foreach ($row in $table) { | |
$team = Get-Team -id $($row.id) -Tenant $source | |
Copy-Team -Team $team -DestinationTenant $destination | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment