On a Windows Server 2008 R2 RDS Terminal Server (Remote Desktop Services), I’m unable to log users off from the Task Manager and am getting the following access denied message:
User could not be logged off. Access is denied.
This is even whilst being logged on as an administrative user.
The fix for this is to run the command prompt as an administrator (right click command prompt link and click Run as Administrator), then type taskmgr and hit enter. The Task Manager will then be running as an administrator and you should no longer get the access denied error which tells you that users could not be logged off.