Upload custom iOS Intune Configuration via Graph API

A customer is right now migrating from a Thirdparty MDM solution to Microsoft Intune. He has a custom iOS IMAP configuration for round about 30 users and do not wanted them to migrate every policy manually so we created a quick Powershell script which is changing the user values inside the XML and uploads them as a configuration via the Intune Graph API.
The interesting part was, that these are Exchange Online Shared mailboxes which have to be configured with the primary user’s UPN account.

So I have taken the DeviceConfiguration_Add.ps1 Powershell Script from the Intune Github Sample Page and added/changed the following things.
The full script is available as a GIST or on the bottom of the blog post.

  • Added a parameter named $upn which is getting the User Principal Name for which user the policy should be built. Line 14-17


  • Added a region called “Build XML” where I am replacing some Usernames with variables. Line 320 – 408


  • Finally a region called “Build JSON Payload” where I encoding the UTF8 XML Payload to a BASE64 string and building the JSON request. Line 410 – 425


    This is my first public Powershell script, so if there are any requests to make it portable and do some error checks I am happy about your feedback.


And here is the full script.

Backup Active Directory Federation Services


I wanted to share a Powershell Backup Script which I created for a customer to backup his ADFS Infrastructure which was part of a Office 365 Deployment with a new tool called AD FS Rapid Restore Tool

Here is a link with all information about the Tool https://blog.auth360.net/2016/10/02/backup-and-recovery-with-the-ad-fs-rapid-restore-tool/

The script which I used as a scheduled task

In Line 2 and 3 you have to define the Backup Share, where the backup should be saved to and the Encryption Password for the Backup. You will need the Password for restoring the backup.
Line 6 checks for backups which are older then 6 months and deletes them
Line 9 imports the DLL from the AD FS Rapid Restore Tool.
Line 10 will start the backup with the configured options.

Have a nice day, Michael