Had a few questions recently regarding Windows 10 falling asleep during Post-installation tasks.  The following will show you how to Export, Import & Set a Custom Power Plan for your Laptop and PC’s. 

A power plan exported will only be able to work on a Laptop, If you export a power plan on a Desktop it will not work on a Laptop. 
You will need read/write network share to import & export the power plan. 
  1. On your preferred device open Control Panel > Hardware & Sound > Power Options.
  2. Choose ‘Create a Power Plan’
  3. Set a ‘Plan name’ and click next
    IgI3gV.png
  4. Set ‘Put the computer to sleep’ to ‘Never’ Click Create. You might also want to change the display timeout and edit any other options you like. 
    TCg9pc.png
  5. You will now see that your Power Plan has been set active.
  6. Open up Powershell ISE as Admin
  7. Type in the following .\powercfg.exe /l and play the script. It will now show you your Power Plans and the GUID numbers. Note your GUID. 
    KqTdGb.png
  8. Now have your network share ready so that you can export it. 
  9. Type in the following .\powercfg.exe /export ‘\\NAS\Share\NewPowerPlan.pow’da058e3d-041f-418f-bcce-50611d2870bd (GUID) Note;; A powerplan must be exported with the extension .pow otherwise it will not import. 
  10. Now that you have exported your PowerPlan we need to import it and set as active.
  11. Open a New Script in the Powershell ISE
  12. Copy the following 
    .\powercfg.exe /import ‘\\NAS\Share\NewPowerPlan.pow’da058e3d-041f-418f-bcce-50611d2870bd
    .\powercfg.exe /setactive da058e3d-041f-418f-bcce-50611d2870bd
    you can test the import and set active by setting the standard powerplan and deleting the new one created using 
    powercfg.exe /delete da058e3d-041f-418f-bcce-50611d2870bd’
    RBhSSd.png
  13. You want to now save the script as ‘PowerPlanLaptop.ps1’ or any name you like and upload it to your KACE SDA. Library > Post Installation Tasks > Choose Action > Add Powershell
  14. Name the Task and choose your PowerPlan.ps1 script to upload and save the task.
    4jsCK5.png
  15. Create a Scripted Installation and test it. It should have no problem working. 
    J5ZXZq.png
I would suggest using it as the First or Second Post-Install task. I hope this helps.