I have been struggling with this for a couple days now so i thought i would reach out to you. When i run your packer template and utilize the win-updates.ps1 script i notice that upon mandatory reboots the powershell prompt that gets loaded between reboots for performing updates is started as admin. I started my own packer templates repo and i have a different behavior. When the initial updates happen they are run in a prompt as admin but upon mandatory update reboots the shell gets open as a non-admin user and i get alot of access-denied errors for the rest of the update script. I have pin-pointed this to something in the autounattend.xml but i have no idea after looking over it multiple times on what in your autounattend.xml vs mine is causing the powershell prompt for windows updates to be open as admin. Any help is greatly appreciated.
I have been struggling with this for a couple days now so i thought i would reach out to you. When i run your packer template and utilize the win-updates.ps1 script i notice that upon mandatory reboots the powershell prompt that gets loaded between reboots for performing updates is started as admin. I started my own packer templates repo and i have a different behavior. When the initial updates happen they are run in a prompt as admin but upon mandatory update reboots the shell gets open as a non-admin user and i get alot of access-denied errors for the rest of the update script. I have pin-pointed this to something in the autounattend.xml but i have no idea after looking over it multiple times on what in your autounattend.xml vs mine is causing the powershell prompt for windows updates to be open as admin. Any help is greatly appreciated.
Here is my autounattend.xml https://github.com/TraGicCode/packer-windows-playground/blob/master/answer_files/2016/autounattend.xml