Skip to content

Instantly share code, notes, and snippets.

Created February 26, 2014 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9225696 to your computer and use it in GitHub Desktop.
Save anonymous/9225696 to your computer and use it in GitHub Desktop.
<#
To run this you'll need to run Powershell with administrative rights. For the last time that is...
#>
#EnableLUA: http://technet.microsoft.com/en-us/library/ff715520.aspx
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0" #Default value is 1
#The following is equal to the Security Policy "User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode" = "Elevate without prompting"
#http://msdn.microsoft.com/en-us/library/cc232761.aspx
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value "0" #Default value is 2
#The following is equal to the Security Policy "User Account Control: Allow UIAccess applications to prompt for elevation without using the secure dekstop" = "Enabled"
#http://technet.microsoft.com/en-us/library/dd835564(v=ws.10).aspx
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableUIADesktopToggle" -Value "1" #Default value is 0
#Reboot server
shutdown -r -t 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment