Skip to content

Instantly share code, notes, and snippets.

@AlexanderHolmeset
Created November 25, 2022 09:58
Embed
What would you like to do?
$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