Share via

Intune PowerShell script is not working

Mohamed Umer 145 Reputation points
2023-09-06T06:55:36.86+00:00

Hi there,

I have implemented a PowerShell script in Intune for changing the desktop background image of a device, first of all, it doesn't work even after restarting, and then when I remove the device from the Intune admin the background changes(PowerShell script works).

I am attaching a file of my settings for your reference, please get me through this.

PowerShell Settings.png

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Intune | Configuration
Microsoft Security | Intune | Enrollment
Microsoft Security | Intune | Other

Answer accepted by question author

Crystal-MSFT 54,311 Reputation points Microsoft External Staff
2023-09-07T01:29:44.0466667+00:00

@Mohamed Umer, Thanks for posting in Q&A. From your description, I know the PowerShell Script to change desktop background image is not working until the device is unenrolled from Intune. If there's any misunderstanding, feel free to let us know.

It seems the script has been deployed successfully and the registry key for desktop backgorund image has been changed in the registry key. But it doesn't take effect although we restart the device.

to Clarify our issue, please collect the following information:

  1. For the affected user, if we login other devices, did it have the same result?
  2. What is the status of the PowerShell script in Intune portal for the affected device?
  3. How many devices are affected? Did it affect all? Is there any difference between the working one and not working one?
  4. Was there any other policy or script assigned to the same user and same device which also set desktop background image?

Please check the above information and if there's any update, feel free to let us know.


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.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.