question

andreasbright-4989 avatar image
0 Votes"
andreasbright-4989 asked NickHogarth-MVP answered

Deployment of a powershell script

Hi,

I have a powershell script that changes some settings in the registry and also do copy some files from a blob.
This script is pushed out successfully.

Now what happens If I change some settings in the script, and upload the script again, will it run ? sin it has been successful the first time ? Or would I need to create a new script, and remove the other ?

Or should I push the script out as a Win32 app ?

Thanks for reply.

mem-intune-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NickHogarth-MVP avatar image
1 Vote"
NickHogarth-MVP answered

If there is a change in the script, it should run again. From https://docs.microsoft.com/en-us/mem/intune/apps/intune-management-extension#important-considerations

The Intune management extension agent checks with Intune once every hour and after every reboot for any new scripts or changes. After you assign the policy to the Azure AD groups, the PowerShell script runs, and the run results are reported. Once the script executes, it doesn't execute again unless there's a change in the script or policy. If the script fails, the Intune management extension agent will attempt to retry the script three times for the next 3 consecutive Intune management extension agent check-ins.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.