Commands › Microsoft Teams

Set-CsTeamsGuestMessagingConfiguration

Microsoft Teams MicrosoftTeams Set-*

TeamsGuestMessagingConfiguration determines the messaging settings for the guest users.

Quick start script

# Set-CsTeamsGuestMessagingConfiguration — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsTeamsGuestMessagingConfiguration
$before | Format-List

# 3. Make the change (dry run first)
Set-CsTeamsGuestMessagingConfiguration  -WhatIf
Set-CsTeamsGuestMessagingConfiguration

# 4. Verify and diff
$after = Get-CsTeamsGuestMessagingConfiguration
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

Identity (Default)

Set-CsTeamsGuestMessagingConfiguration [-Tenant <Guid>] [-AllowUserEditMessage <Boolean>]
 [-AllowImmersiveReader <Boolean>] [-AllowUserDeleteMessage <Boolean>] [-AllowUserChat <Boolean>] [-AllowGiphy <Boolean>]
 [-AllowUserDeleteChat <Boolean>] [-GiphyRatingType <String>] [-AllowMemes <Boolean>] [-AllowStickers <Boolean>] [-UsersCanDeleteBotMessages <Boolean>] [[-Identity] <XdsIdentity>]
 [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Instance

Set-CsTeamsGuestMessagingConfiguration [-Tenant <Guid>] [-AllowUserEditMessage <Boolean>]
 [-AllowImmersiveReader <Boolean>] [-AllowUserDeleteMessage <Boolean>] [-AllowUserChat <Boolean>] [-AllowGiphy <Boolean>]
 [-AllowUserDeleteChat <Boolean>] [-GiphyRatingType <String>] [-AllowMemes <Boolean>] [-AllowStickers <Boolean>] [-UsersCanDeleteBotMessages <Boolean>] [-Instance <PSObject>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (16)

ParameterTypeRequiredWhat it controls
-AllowGiphy Boolean Determines if Giphy images are available.
-AllowImmersiveReader Boolean Determines if immersive reader for viewing messages is enabled.
-AllowMemes Boolean Determines if memes are available for use.
-AllowStickers Boolean Determines if stickers are available for use.
-AllowUserChat Boolean Determines if a user is allowed to chat.
-AllowUserDeleteChat Boolean Turn this setting on to allow users to permanently delete their one-on-one chat, group chat, and meeting chat as participants (this deletes the chat only for them, not other users in the chat). Set this to TRUE to...
-AllowUserDeleteMessage Boolean Determines if a user is allowed to delete their own messages.
-AllowUserEditMessage Boolean Determines if a user is allowed to edit their own messages.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Force SwitchParameter Suppresses all non-fatal errors.
-GiphyRatingType String Determines Giphy content restrictions. Default value is "Moderate", other options are "NoRestriction" and "Strict"
-Identity XdsIdentity {{ Fill Identity Description }}
-Instance PSObject {{ Fill Instance Description }}
-Tenant Guid {{ Fill Tenant Description }}
-UsersCanDeleteBotMessages Boolean Determines whether a user is allowed to delete messages sent by bots. Set this to TRUE to allow. Set this to FALSE to prohibit.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.