Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:9225696
Created Feb 26, 2014

What would you like to do?
<#
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