Command
New-TeamCopyOptions
Description
The command to create copy options when copying teams or team channels.
Note: with the -PostedMessagesMigrationStartDate
parameter, ShareGate Migrate will migrate up to 500 messages in the post tab instead of the 50 messages limitation.
Index
Examples
Create team copy options
$date = [DateTime]::ParseExact("01-31-2023", "MM-dd-yyyy", $null) New-TeamCopyOptions -NoMessages -NoFiles -PostedMessagesMigrationStartDate $dateIncludeMessages : False IncludePlannerPlans : True IncludeFiles : False IncludeTabs : True IncludeApps : True IncludeMembership : True CopyPrivateChannelMembershipToPrivateTeamBehavior : DontAddUsers PostedMessagesMigrationStartDate : 01/31/2023 12:00:00 AM
Copy team with options
$options = New-TeamCopyOptions -NoApps $source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $team = Get-Team -Name "MyTeam" -Tenant $source Copy-Team -Team $team -DestinationTenant $destination -CopyOptions $options
Copy team channels with options
$date = [DateTime]::ParseExact("01-31-2023", "MM-dd-yyyy", $null) $options = New-TeamCopyOptions -NoMembership -PostedMessagesMigrationStartDate $date $source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $sourceTeam = Get-Team -Name "MyTeam" -Tenant $source $destinationTeam = Get-Team -Name "MyOtherTeam" -Tenant $source $sourceChannels = Get-TeamChannel -Team $sourceTeam Copy-TeamChannel -Channel $sourceChannels -DestinationTeam $destinationTeam -CopyOptions $options
Incremental team copy with different options
$options = New-TeamCopyOptions -NoTabs $source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant Copy-TeamIncremental -SessionId 211027-1 -SourceTenant $source -DestinationTenant $destination -CopyOptions $options
Syntax
New-TeamCopyOptions[-NoMessages <SwitchParameter>][-NoPlannerPlans <SwitchParameter>][-NoFiles <SwitchParameter>][-NoTabs <SwitchParameter>][-NoApps <SwitchParameter>][-NoMembership <SwitchParameter>][-PostedMessagesMigrationStartDate <DateTime>]
New-TeamCopyOptions[-NoMessages <SwitchParameter>] [-NoPlannerPlans <SwitchParameter>][-NoFiles <SwitchParameter>] [-NoTabs <SwitchParameter>][-NoApps <SwitchParameter>] [-NoMembership <SwitchParameter>][-CopyPrivateChannelMembershipToPrivateTeamBehavior<CopyPrivateChannelMembershipToPrivateTeamBehavior {DontAddUsers | AddAllUsers}>][-PostedMessagesMigrationStartDate <DateTime>]
Parameters
-CopyPrivateChannelMembershipToPrivateTeamBehavior <CopyPrivateChannelMembershipToPrivateTeamBehavior>
Specifies the membership behavior for private channel members when copying inside a private team. AddAllUsers will add all private channel members to the private team, DontAddUsers will not.
Required? | False |
Default value | DontAddUsers |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoApps <SwitchParameter>
Specifies to not copy the team's apps.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoFiles <SwitchParameter>
Specifies to not copy the team's files.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoMembership <SwitchParameter>
Specifies to not copy the team's membership.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoMessages <SwitchParameter>
Specifies to not copy the team's messages.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoPlannerPlans <SwitchParameter>
Specifies to not copy the team's Planner plans.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NoTabs <SwitchParameter>
Specifies to not copy the team's tabs.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-PostedMessagesMigrationStartDate <DateTime>
Specifies the starting date from which the messages will be migrated in the Posts tab in Teams (up to 500 messages), while the rest will be in the message history tab.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |