QUESTION: How to deploy the same settings on multiple policies in a future-proof manner
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.
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)
Ok, thanks.
Does the same apply to Intune Configuration policies and SharePoint Sites?
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.