Imports team channels into a Microsoft 365 tenant.
Import-M365TeamChannels
[-ShowPrereqs]
[<CommonParameters>]
Import-M365TeamChannels
-ConfigNode <String>
-Csv <String>
[-TranslationCsv <String>]
[-IgnoreErrors]
[-SkipValidation]
[-ValidateOnly]
[<CommonParameters>]
Use the Import-M365TeamChannels cmdlet to import team channels
into a Microsoft 365 tenant.
Run Import-M365Teams before importing channels. Each channel row identifies an existing parent team
through TeamIdentity. The primary row configures the automatically created channel; additional rows create
new channels.
Standard channels inherit membership from their team. Supply those members in the Teams CSV. Private and shared
channels use their own owner and member columns. M365 shared channels restore effective users as direct members
and report the change from a live team-sharing relationship. Channel moderation and isFavoriteByDefault are
unsupported. Google spaces expose one synthetic primary channel; the Teams importer provisions space membership.
See the Notes section for cmdlet requirements.
Import-M365TeamChannels -ConfigNode Target -Csv 'teams.csv' -ValidateOnly
This example validates all data for the teams in the teams.csv
file but does not perform the operation. This is a recommended first step so any
warnings can be addressed first.
Import-M365TeamChannels -ConfigNode Target -Csv 'teams.csv'
This example imports all teams from the teams.csv file.
Import-M365TeamChannels -ConfigNode Target -Csv 'teams.csv' -TranslationCsv 'translations.csv'
This example imports all teams from the teams.csv file.
Data is translated according to the mappings provided in the translations.csv
file.
The config.psd1 configuration node to use.
Type: String
Parameter Sets: Action
Aliases:
Accepted values: Source, Target
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path to a CSV file containing objects to import. See the Notes section for the required format.
Type: String
Parameter Sets: Action
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Validation errors stop execution prior to the import by default. Use
-IgnoreErrors to proceed with error records omitted.
Note that global errors are not impacted by this option.
Type: SwitchParameter
Parameter Sets: Action
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prints the cmdlet prerequisites.
Type: SwitchParameter
Parameter Sets: Help
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Skips the property validation stage of the import. Data supplied via the
-Csv parameter will be used as-is, which may lead to runtime errors.
Type: SwitchParameter
Parameter Sets: Action
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path to the CSV file containing translation mappings. The file must use
SourceName;TargetName as the field identifiers.
Type: String
Parameter Sets: Action
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Validation and import are both performed by default. Use -ValidateOnly to
perform the validation but skip the import.
It is recommended to run a -ValidateOnly pass first to identify potential
issues prior to importing data. Note that records with validation errors will
fail to import unless -IgnoreErrors is used, but records with validation
warnings proceed without the data triggering the warning. A -ValidateOnly pass
allows you to inspect these warnings before data is written and make any
necessary changes.
Type: SwitchParameter
Parameter Sets: Action
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Required config.psd1 keys
These configuration keys are scoped to the Source or Target node in config.psd1.
M365Admin: The user principal name of your tenant’s administrator.
M365ClientId: The client ID of your tenant’s app.
M365ClientSecret: The client secret of your tenant’s app.
M365SharePointDomain: The name of your SharePoint domain. For example, source.
M365Tenant: The ID of your tenant. For example, source.org.
Optional config.psd1 keys
These configuration keys are scoped to the Source or Target node in config.psd1.
M365ClientCertificate: The path to the certificate file associated with your tenant’s app.
Default: $env:ProgramData\Transend\tools\TMCTools.pfx
M365CloudEnvironment: The cloud environment for your tenant. Allowed values are Global, China (.cn),
Germany (.de) and USGovernment (.us).
Default: Global
Required PowerShell modules
ExchangeOnlineManagementPnP.PowerShellRequired APIs
Office 365 Exchange OnlineMicrosoft GraphSharePointRequired Microsoft Graph Application scopes
Application.Read.AllChannel.CreateChannelMember.ReadWrite.AllChannel.ReadBasic.AllChannelSettings.ReadWrite.AllDomain.Read.AllGroup.Read.AllLicenseAssignment.Read.AllOrgContact.Read.AllSites.Read.AllTeam.CreateTeamMember.ReadWrite.AllTeam.ReadBasic.AllTeamSettings.ReadWrite.AllUser.Read.AllRequired Office 365 Exchange Online Application scopes
Exchange.ManageAsAppRequired SharePoint Application scopes
Sites.FullControl.AllRequired CSV format
| Property | Required | Multi-value | Notes |
|---|---|---|---|
| InScope | True | False | Yes, True, No, or False. |
| TeamIdentity | True | False | Existing parent team identity. |
| DisplayName | True | False | Channel display name. |
| Type | True | False | M365: Standard, Private, or Shared; Google: Standard. |
| IsPrimary | True | False | Whether to configure the existing primary channel. |
| ModerationEnabled | False | False | True is unsupported. |
| InternalOwnersToAdd | False | True | Restricted channel owners. |
| InternalMembersToAdd | False | True | Restricted channel members. |
CSV fields should be separated by semicolons. For example,
InScope;DisplayName....
Multi-value fields should be separated by commas. For example,
value1,value2....