Skip to content

Instantly share code, notes, and snippets.

Created November 25, 2022 09:58
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 -Browser
$destination = Connect-Tenant -Domain -Browser
foreach ($row in $table) {
$team = Get-Team -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