Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

QUESTION: How to deploy the same settings on multiple policies in a future-proof manner

Open Tom-DB opened this issue 2 years ago • 3 comments

General question: Can you deploy settings on all policy / channel variances in a resources, without having to specify all of them?

Example 1: We currently have 3 Teams channels, which results in 3 TeamsTeam resources:

  • TeamA
  • TeamB
  • TeamC

We want to ensure that in every Teams channel (even the ones created afterwards) the AllowAddRemoveApps setting has the False value. How can we do this in a scalable manner, without having to specify all of the Teams channels?

Example 2: How can we set in the TeamsCallingPolicy resource for every sub policy the value of the setting MusicOnHoldEnabledType to Disabled, without having to specify every sub policy?

We want to ensure that when a new sub policy is created, this setting is set to Disabled.

Tom-DB avatar May 22 '24 14:05 Tom-DB

You need additional logic to do so. This is usually not part of DSC that new objects that are not part of your configuration year would be configured afterwards.

If it’s just these two settings, I would implement a custom script that would enforce these two settings. This is more feasible than implementing something special in your configuration (which would doable, e.g. custom script resource)

andikrueger avatar May 30 '24 21:05 andikrueger

Ok, thanks.

Does the same apply to Intune Configuration policies and SharePoint Sites?

Tom-DB avatar Jun 19 '24 16:06 Tom-DB

I'd say so yes. Otherwise you need to create policies for all of the different resources and specify the properties, which is a tedious job.

FabienTschanz avatar Jun 30 '25 14:06 FabienTschanz