Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$PolicyName = "NoGiphyOrStickersMessagePolicy"
$InformationPreference = 'Continue'
Import-Module "C:\\Program Files\\Common Files\\Skype for Business Online\\Modules\\SkypeOnlineConnector\\SkypeOnlineConnector.psd1"
$Session = New-CsOnlineSession
Import-PSSession -Session:$Session -AllowClobber
if (-not $(Get-CsTeamsMessagingPolicy -Identity:$PolicyName -ErrorAction:SilentlyContinue)) {
Write-Information -MessageData:"New-CsTeamsMessagingPolicy -Identity:'$PolicyName'"
New-CsTeamsMessagingPolicy -Identity:$PolicyName -Description:'A policy for no Giphy Or Stickers for Messaging.'
}
Write-Information -MessageData:"Set-CsTeamsMessagingPolicy -Identity:'$PolicyName'"
Set-CsTeamsMessagingPolicy -Identity:$PolicyName `
-AllowUrlPreviews:$true `
-AllowOwnerDeleteMessage: $true `
-AllowUserEditMessage: $true `
-AllowUserDeleteMessage: $true `
-AllowUserChat: $true `
-AllowRemoveUser: $true `
-AllowGiphy: $false `
-GiphyRatingType: Strict `
-AllowMemes: $false `
-AllowImmersiveReader: $true `
-AllowStickers: $false `
-AllowUserTranslation: $true `
-ReadReceiptsEnabledType: UserPreference `
-AllowPriorityMessages: $true `
-ChannelsInChatListEnabledType: DisabledUserOverride `
-AudioMessageEnabledType: ChatsAndChannels `
Remove-PSSession -Session:$session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment