Windows 10: How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.

Discus and support How to make a PowerShell script run on System Startup in the OOBE Sysprep environment. in Windows 10 Software and Apps to solve the problem; Thanks for stopping by, I've searched the corners of the internet but haven't gotten anywhere. To provision devices for my organization, we must... Discussion in 'Windows 10 Software and Apps' started by Jacob Raffoul, Apr 23, 2022.

  1. How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.


    Thanks for stopping by, I've searched the corners of the internet but haven't gotten anywhere. To provision devices for my organization, we must manually run PowerShell commands using SHIFT + F10 in the Windows 11 OOBE as we have multiple methods, one of which being legacy. I'm sure there are better methods but I'm unfortunately working within these limitations. So far, to automate the imaging process, I've created an autounattend.xml which makes WinPE completely silent and some pages of the OOBE also. Recently, I combined all the PowerShell commands we had been running prior into a script tha

    :)
     
    Jacob Raffoul, Apr 23, 2022
    #1
  2. sachind1 Win User

    script running on Startup and Shutdown of System is not working

    Steps

    • Open a run box
    • type in "gpedit.msc"
    • Expand Computer Configuration
    • Expand Windows Settings
    • Select Scripts (Startup/Shutdown)
    • Double click Startup
    • Click Show Files and copy/paste your file in to this folder
    • Click the Add button on the startup properties
    • Click Browse and double click on your script to choose it.
    • "OK" out of all windows to apply the new settings.
    I am generally Giving Path of My python to the startup and shutdown as steps given above
     
    sachind1, Apr 23, 2022
    #2
  3. Windows 10 OOBE loop after sysprep

    I ran into boot loop after sysprep Windows 10.

    I've prepared a custom machine to deploy with WDS.

    Sysprep has been run with /oobe/generalize options.

    When I restart, windows 10 get into a reboot loop, and every time ask for system oobe wizard.

    I found these on setuperr log file:

    [msoobe.exe] Failed to set password and password hint with hr=0xD000006C

    [msoobe.exe] Failed to create the default account with hr=0xD000006C

    [msoobe.exe] TASK: End failed running task PrepareUserOOBE with hr=0xD000006C.

    [msoobe.exe] Failed user OOBE prep task with hr=0xD000006C

    [msoobe.exe] Failed to run OOBE Host with hr=0x80004005

    [msoobe.exe] OOBE failed with hr=0x80004005

    [windeploy.exe] Command [%windir%\system32\oobe\oobeldr.exe /system /quiet] failed with exit code [0x80004005]

    [windeploy.exe] OnError commands failed. hr = 0x80070002
     
    Giorgio Caldana, Apr 23, 2022
    #3
  4. sachind1 Win User

    How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.

    script running on Startup and Shutdown of System is not working

    I want to run a python script on startup and shutdown of System . I am Using Windows 7 . I follows the steps given by Microsoft to run a script on startup and shutdown but that's not working in my case . Can we run a python script on startup or Only .bat
    file can be run ?
     
    sachind1, Apr 23, 2022
    #4
Thema:

How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.

Loading...
  1. How to make a PowerShell script run on System Startup in the OOBE Sysprep environment. - Similar Threads - PowerShell script run

  2. Unattended Execution of Powershell Script during Sysprep Process

    in Windows 10 Gaming
    Unattended Execution of Powershell Script during Sysprep Process: I'm trying to execute a PowerShell script unattendedly via the Sysprep process using the RunSynchronousCommand in the unattend.xml file, at the specialize phase as Copilot strongly recommended.Despite following this syntax, the script isn't running as expected. Can anyone...
  3. Unattended Execution of Powershell Script during Sysprep Process

    in Windows 10 Software and Apps
    Unattended Execution of Powershell Script during Sysprep Process: I'm trying to execute a PowerShell script unattendedly via the Sysprep process using the RunSynchronousCommand in the unattend.xml file, at the specialize phase as Copilot strongly recommended.Despite following this syntax, the script isn't running as expected. Can anyone...
  4. Unattended Execution of Powershell Script during Sysprep Process

    in Windows 10 Installation and Upgrade
    Unattended Execution of Powershell Script during Sysprep Process: I'm trying to execute a PowerShell script unattendedly via the Sysprep process using the RunSynchronousCommand in the unattend.xml file, at the specialize phase as Copilot strongly recommended.Despite following this syntax, the script isn't running as expected. Can anyone...
  5. Run desktop script in PowerShell

    in Windows 10 Network and Sharing
    Run desktop script in PowerShell: I have a script on my desktop that I need to run in PowerShell; how do I do that? https://answers.microsoft.com/en-us/windows/forum/all/run-desktop-script-in-powershell/666a7726-8cbd-42c7-ac2c-419229432252
  6. Run desktop script in PowerShell

    in Windows 10 Gaming
    Run desktop script in PowerShell: I have a script on my desktop that I need to run in PowerShell; how do I do that? https://answers.microsoft.com/en-us/windows/forum/all/run-desktop-script-in-powershell/666a7726-8cbd-42c7-ac2c-419229432252
  7. Run desktop script in PowerShell

    in Windows 10 Software and Apps
    Run desktop script in PowerShell: I have a script on my desktop that I need to run in PowerShell; how do I do that? https://answers.microsoft.com/en-us/windows/forum/all/run-desktop-script-in-powershell/666a7726-8cbd-42c7-ac2c-419229432252
  8. How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.

    in Windows 10 Gaming
    How to make a PowerShell script run on System Startup in the OOBE Sysprep environment.: Thanks for stopping by, I've searched the corners of the internet but haven't gotten anywhere. To provision devices for my organization, we must manually run PowerShell commands using SHIFT + F10 in the Windows 11 OOBE as we have multiple methods, one of which being legacy....
  9. How can cmd script check for powershell environment?

    in Windows 10 Support
    How can cmd script check for powershell environment?: I can execute script abc.cmd in either a command prompt or powershell environment/window. Can it determine the environment in which it runs? Powershell 5, W10Pro64, 1803 Thank you and a Merry Christmas. 124044
  10. Run PowerShell Script As An Administrator

    in Windows 10 Support
    Run PowerShell Script As An Administrator: Hi. So I've been searching online on a way to do this yet I cannot find a way to do it. _______________________________________ I need this in specific: I want to double click a PowerShell script file (which will run as an administrator) from Windows Explorer that has...

Users found this page by searching for:

  1. using script in oobe