none
How to disable UAC

    Question

  •  

    It's not that difficult to disable UAC if you read this blog. However, is there a way to do it in PowerShell or in scripts? I can't find a command that detects if UAC is enabled or disables UAC. Do you know how to do this at the command prompt?
    Thursday, February 07, 2008 8:37 PM

Answers

  • The best way is to change the registry key at registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system; key = EnableLUA

    You can use the following powershell code to check the value:
    Code Snippet

    $UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
    $UAC.EnableLUA


    To change the value and disable UAC:
    Code Snippet

    Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -Value 0


    You need to reboot to make it take effect.
    Tuesday, February 12, 2008 8:52 PM

All replies