Created
July 3, 2019 11:42
-
-
Save ismits/ea44112d5a1c2ea09afec3eda4a6b249 to your computer and use it in GitHub Desktop.
Disable UAC via PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Disable-UAC | |
{ | |
Write-Log "Disabling User Access Control (UAC)..." | |
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" | |
New-RegKey $RegPath | |
Write-Log (New-ItemProperty -Path $RegPath -Name "EnableLUA" -Value 0 -PropertyType "DWORD" -Force) | |
Write-Log (New-ItemProperty -Path $RegPath -Name "ConsentPromptBehaviorAdmin" -Value 0 -PropertyType "DWORD" -Force) | |
Write-Log ("Disabling User Access Control (UAC) complete.") | |
return $true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment