none
Running Powershell script as admin at logon after sysprep.

    Question

  • I've ordered 500 new laptops from Dell and I'm setting up the seed unit to send back to them so they can clone it to the other 500. I setup my unattend.xml file to automatically get past the oobe experience and automatically login to a custom administrator account that is on the image and that's working fine, my problem is I have a scheduled task that suppose to run at logon, that launches a powershell script, from any user and give the computer a hostname that is determined by the IP address and service tag then join it to the domain. The script is working fine, but for some reason when the computer auto logs into this account the scheduled tasks never fires. I'm guessing it has something to do with the sysprep autologon. I've also tried launching the script from the startup folder, but that won't launch it as an admin even though user account controls have been turned off (Windows 10). 

    Anyone know why the scheduled task will not activate when a user is auto logged in after sysprep? Do you have a better way I can launch this powershell script as an admin on the local machine?

    Thursday, March 30, 2017 3:26 PM

All replies