Solution below works like a charm!
https://github.com/microsoftgraph/powershell-intune-samples/tree/master/SettingsCatalog
Export single Configuration Profile (Settings Catalog) as a file
I am looking for a PS1 script or other simple solution to export and import single config profile created by Settings Catalog mechanizm as a file. Is there a such thing? Group Policies had this feature like 10 years ago :D
(Please don't tell me go to uservoice).
5 answers
Sort by: Most helpful
-
Pavel yannara Mirochnitchenko 12,611 Reputation points MVP
2023-01-20T08:24:00.2166667+00:00 -
Crystal-MSFT 49,426 Reputation points Microsoft Vendor
2022-09-12T09:35:35.167+00:00 @Pavel yannara Mirochnitchenko , From your description, it seems you want to export and import the Settings Catalog policy in Intune. If there's any misunderstanding, please let us know.
Based on my research, I find the PowerShell scripts under :https://github.com/microsoftgraph/powershell-intune-samples
To export the Settings Catalog policy, you can follow the steps as below:
Note: It will export all the setting Catalog policies. Each policy will have its JSON file. You can find the one you want.- Download the Intune PowerShell scripts from https://github.com/microsoftgraph/powershell-intune-samples. Save the .zip file into the downloads folder. Right-click on the powershell-intune-samples-master zip file and select Extract all > Extract.
- Run PowerShell as an Administrator and accept the UAC popup. Run Set-ExecutionPolicy Bypass Run Install-Module AzureAD. Approve installing the module.
- Change the location to the "SettingsCatalog" under "powershell-intune-samples-master"
- Run the script .\SettingsCatalog_Export.ps1
- Sign-in using your Intune administrator account. Select the checkbox to consent on behalf of your organization and click Accept.
- Provide the export location. And you can find all the policies under this location.
To import the Settings Catalog policy, you can follow the steps as below:
- Run PowerShell as an Administrator and accept the UAC popup. Run Set-ExecutionPolicy Bypass. Run Install-Module AzureAD. Approve installing the module.
- Change to the "SettingsCatalog" folder
- Run script .\SettingsCatalog_Import_FromJSON.ps1
4 Type the setting catalog JSON file you want to import. - Then you will see the new policy created in the portal.
Note: I change the name in JSON file and add new in the previous name. Then I see the policy with a new name in my portal.
Hope it can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
Vardhan Joshi 56 Reputation points
2023-04-26T21:26:03.31+00:00 I am trying from one tenancy to other and it says file not exist.
-
Pavel yannara Mirochnitchenko 12,611 Reputation points MVP
2024-04-15T06:18:33.2633333+00:00 These scripts are based on AzureAD cmdlets and they are expired now. So the functionality stopped working, naturally.
-
Pavel yannara Mirochnitchenko 12,611 Reputation points MVP
2024-04-26T05:20:43.9233333+00:00 I found new solution which is also kept up-to-date. It just works :)