Forum Discussion
Can we block a Microsoft 1st party App Via powershell command
Yes, you can use the New-CsTeamsMessagingPolicy cmdlet in PowerShell to create a messaging policy that blocks a specific app by default. Here's an example command to create a policy that blocks the "MyApp" app:
New-CsTeamsMessagingPolicy -Identity BlockMyApp -AllowUserApps $false -BlockedApplications @{Add="MyApp"}
This command creates a new messaging policy named "BlockMyApp" that blocks the "MyApp" app. The AllowUserApps parameter is set to $false to prevent users from installing apps themselves. The BlockedApplications parameter is used to specify the app to block.
Once the policy is created, you can assign it to users or groups using the Grant-CsTeamsMessagingPolicy cmdlet. Here's an example command to assign the "BlockMyApp" policy to a specific user:
Grant-CsTeamsMessagingPolicy -Identity email address removed for privacy reasons -PolicyName BlockMyApp
This command assigns the "BlockMyApp" policy to the user with the SIP address
email address removed for privacy reasons