Disable UAC in Windows Server 2012 – SharePoint Best Practice
In SharePoint 2013 farms on Windows Server 2012, it is annoying that we’ve to choose “Run as Administrator” whenever opening Central Administration, Command Prompt, SharePoint Management Shell, Windows PowerShell, etc. and failing so would introduce some weird issues such as buttons and links missing in SharePoint Central Admin ribbon, Getting Access denied for Farm administrators, etc.
PowerShell too! When launching the SharePoint Management Shell, it scolds with “The local farm is not accessible. Cmdlets with featuredependencyId are not registered.” On running any SharePoint cmdlets, “Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.”
Although I’m a Domain Administrator and Local Server administrator, I’ve to pick “Run as Administrator” to get rid of these issues. I hate to do Right Click and choose “Run as Administrator” every time on these programs.
Turn off UAC in Windows Server 2012
So, Let’s disable UAC in Windows Server 2012 in two steps. Here is how:
- Go to Server Manager >> Choose “System Configuration” from Tools menu. (Shortcut: MSCONFIG)
- Under the Tools tab, select “Change UAC Settings” and click on “Launch” button
- Drag the slider down to “Never Notify” and click “OK”.
But wait! We are not yet done. Make this registry change!
Unlike Windows Server 2008 R2, Sliding down the UAC button to “Never notify” will NOT disable UAC in Windows Server 2012. You got to do one more fix in the windows registry:
- Open Windows Registry Editor (shortcut: Regedit)
- Navigate to the following registry key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
- In the Right Pane, locate the “EnableLUA” DWORD value. Double click and set its Value “0” (zero)
- Exit Registry Editor and then restart your Server.
You can achieve the registry fix with PowerShell. Just run these commands in Windows PowerShell.
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0"
Shutdown -r -t 0
This script disables UAC and restarts your Server automatically!
this article is awesome especially the registry part for win 2012. thanks