Show / Hide Table of Contents

    Submit-PnPTeamsChannelMessage

    SYNOPSIS

    Required Permissions

    • Microsoft Graph API: API required one of 'Teamwork.Migrate.All, ChannelMessage.ReadWrite.All'.

    Sends a message to a Microsoft Teams Channel.

    SYNTAX

    Submit-PnPTeamsChannelMessage -Team <TeamsTeamPipeBind> -Channel <TeamsChannelPipeBind> -Message <String>
     [-ContentType <TeamChannelMessageContentType>] [-Important]  [<CommonParameters>]
    

    DESCRIPTION

    Allows to send a message to a Microsoft Teams Channel.

    EXAMPLES

    EXAMPLE 1

    Submit-PnPTeamsChannelMessage -Team MyTestTeam -Channel "My Channel" -Message "A new message"
    

    Sends "A new message" to the specified channel

    EXAMPLE 2

    Submit-PnPTeamsChannelMessage -Team MyTestTeam -Channel "My Channel" -Message "<strong>A bold new message</strong>" -ContentType Html
    

    Sends the message, formatted as html to the specified channel

    PARAMETERS

    -Channel

    Specify the group id, mailNickname or display name of the team to use.

    Type: TeamsChannelPipeBind
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -ContentType

    Specify to set the content type of the message, either Text or Html.

    Type: TeamChannelMessageContentType
    Parameter Sets: (All)
    Accepted values: Text, Html
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Important

    Specify to make this an important message.

    Type: SwitchParameter
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Message

    The message to send to the channel.

    Type: String
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Team

    Specify the group id, mailNickname or display name of the team to use.

    Type: TeamsTeamPipeBind
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer