MDT how to run powershell script during WINPE?

Eaven HUANG 2,191 Reputation points
2022-06-08T08:32:07.453+00:00

Dear experts,

I'm trying to add a script to change default wallpaper for new computers. I learned from internet that we need to add the powershell script during WinPE and before the State Restore reboot.
I attached the normal Task Sequence we are using, where I can add the powershell script?

Thanks a lot!

209461-winpe.png

Windows for business Windows Client for IT Pros Devices and deployment Set up, install, or upgrade
Microsoft Security Intune Configuration Manager Other
0 comments No comments
{count} vote

Accepted answer
  1. Simon Ren-MSFT 40,341 Reputation points Microsoft External Staff
    2022-06-13T07:19:18.383+00:00

    Hi,

    Thanks very much for your feedback. We're glad that the question is solved now. It's appreciated that you could click "Accept Answer" to the helpful reply, this will help other users to search for useful information more quickly. Here's a short summary for the problem.

    Problem/Symptom:
    When we added a script to change default wallpaper for new computers, it showed powershell not detected, even though we have enabled powershell support in WinPE boot images.

    Solution/Workaround:
    Put the script in the period of State Restore and it works just fine.

    Thanks again for your time! Have a nice day!

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Simon Ren-MSFT 40,341 Reputation points Microsoft External Staff
    2022-06-08T09:44:29.917+00:00

    Hi,

    Thanks for posting in Microsoft MECM Q&A forum.

    Similar thread for your reference:
    SETTING THE DEFAULT WINDOWS WALLPAPER DURING OS DEPLOYMENT
    Replacing default wallpaper in Windows 10 using Script/MDT/SCCM
    Please note: The links are not from Microsoft, just for your reference. Thanks for your time.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    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.


Your answer

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