DeviceConfiguration_Export.ps1 does not export profiles that are type Administrative template
When configuration profiles are exported via script DeviceConfiguration_Export.ps1, all profiles are exported except Administrative templates.
There is a good one here that may help: https://github.com/sandytsang/MSIntune/tree/master/Intune-PowerShell/DeviceConfiguration
This exports the admin templates to folders/files on your local machine. Can be easily imported too.
There is a good one here that may help: https://github.com/sandytsang/MSIntune/tree/master/Intune-PowerShell/DeviceConfiguration
This exports the admin templates to folders/files on your local machine. Can be easily imported too.
Yes thank you, I have found it also, just was surprised that the MS version does not include it as well.
If you prefer to contain it into a script. You just run a single export then build it into a PowerShell script
I first use the functions from the link I sent ( https://github.com/sandytsang/MSIntune/tree/master/Intune-PowerShell/DeviceConfiguration) to pull the JSON files.
I then use the 2 functions that are provided for the re-import (Provided in the above link) Create-GroupPolicyConfigurations Create-GroupPolicyConfigurationsDefinitionValues
Using the exported JSON files, you can create your own within a script. Example below is a single definition value.
$MSAccessTrustCentre_AllowNetworkLocations = @" { "[email protected]": "https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('3892f4ca-286f-4641-92e8-948376f6c8d5')", "enabled": "true" } "@
You can then use something like the below to create the policy and add the values;
Create-GroupPolicyConfigurations -DisplayName "NameOfPolicy" $ODConfig = Get-GroupPolicyConfigurations | Where-Object {$_.displayname -like "NameOfPolicy"} $ODConfigId = $ODConfig.id Create-GroupPolicyConfigurationsDefinitionValues -GroupPolicyConfigurationID $ODConfigId -JSON $MSAccessTrustCentre_AllowNetworkLocations
Then just add in more definition values using the same Create-GroupPolicyConfigurationDefinitionValues
It would be nice if this could be added / fixed (how ever you want to call it), so that the Administrative templates can also be exported & imported
Hi, i have this same problem with export Administrative Templates and Settings catalog