This feature in Endpoint Manager helps you to run the procedure when the profile configured with the option "Run this procedure immediately when the profile is assigned to a new device" is associated with a device.
Please refer following steps to accomplish this.
Step : In Endpoint Manager go to "Configuration Templates" → "Profiles". Please select profile associated with a device which you want to enable this feature
Step : Click "Add Profile Section" on that chose "Procedures", it will navigate to next page on that click "Add" a button for scheduling the procedure execution.
Step : The Add Existing Procedure dialog box will be opened. On that choose the script which you have already created for a scheduled run once the profile has been created.
Procedure name: Choose the procedure which you need to schedule.
Start date: Set the date which you need to schedule.
Schedule: We can able to schedule the script procedure run as Never, Daily, Weekly or Monthly.
Scheduled Time: Set the time for script Execution needs to be started
i) Run this procedure immediately when the profile is assigned to a new device - Enable this field for immediate execution of the script when the profile is associated with the new device.
If the above option selected in the profile, it will run procedures on below cases,
1. Whenever you are enrolling a new device, default profile configured with the procedure will be applied automatically to the device upon successful enrollment.
2. Similarly, when a profile configured with this option associated with the existing device in the Endpoint Manager portal, it will automatically execute the procedure upon successful profile association.
ii) If you enabled "Skip procedure if the device is offline" checkbox.It will skip the procedure and it won't consider the queued up script.If the option is disabled means the script procedure will be queued and perform its action once the device is in online.
Similarly, we can able to choose the script execution as System User or Logged in User.
Please refer below screenshot for example configurations,
Once after successful profile associated with the device, we can refer the script execution as given below,