Windows Server 2012 – Access Denied When Running IISReset as Local Administrator

windows-server-2012

I am a member of the local administrator's group on a Windows Server 2012 machine, but when I try to run IISReset from the command prompt I get:

Access denied, you must be an administrator of the remote computer to use this command. Either have your account added to the administrator local group of the remote computer or to the domain administrator global group.

I've disabled UAC on this machine, and I'm RDP'd in via remote Desktop Connection Manager, so I'm not sure why the machine thinks I'm not a local administrator.

Best Answer

Even with UAC disabled, are you using an administrative command prompt?

The security token for administratively running IISRESET isn't there under a normal command prompt even if you've moved the UAC slider to "Never Notify".

You can follow these steps:

  1. Open PowerShell
  2. Type Regedit then hit enter
  3. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftWindows\CurrentVersion\policies\system
  4. Double click on EnableLUA
  5. Change the Value data to a 0
  6. Click OK, then reboot the server

to completely disable UAC, and then try running IISRESET from a normal cmd prompt, but it isn't good practice to completely disable UAC on any server.

CREDIT: http://www.nimbo.com/blog/how-to-disable-user-account-control-in-windows-server-2012/