CmdID / PowerShell / Cmdlets / Get
Get-CsTeamsMessagingPolicy
The CsTeamsMessagingPolicy cmdlets enable administrators to control if a user is enabled to exchange messages. Microsoft Teams PowerShell reference
From the Microsoft Teams PowerShell reference 4 parameters Its page in the reference
Parameters
-FilterEnables you to use wildcard characters when specifying the policy (or policies) to be returned.-IdentityUnique identifier for the policy to be retrieved.-LocalStore-Tenant