Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Windows 8 execute all things as admin
#To disable the UAC prompt and run everything by default as admin
#Is set to 1 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0"
shutdown -r -t 0 #reboot
#--------------------------------------------------
#If the above breaks your ability as an Admin to install apps from the Microsoft store
#run the following in an elevated Powershell console
#Is set to 2 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value "0"
#Is set to 0 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableUIADesktopToggle" -Value "1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.