qwinsta --"Error [5] - Access is denied"
Asked Answered
G

2

12

I am getting the "access is denied" error even though I have no problem connecting with Remote Desktop Connection. My computer is Win7, the targets are WinXP or Server 2003.
Perhaps I am specifying the SERVER name incorrectly:
qwinsta /SERVER:XXYYZZ02
I have tried
qwinsta /SERVER:\\XXYYZZ02
qwinsta /SERVER:domain\XXYYZZ02
qwinsta /SERVER:domain/XXYYZZ02
qwinsta /SERVER:1.2.3.4

Am I doing something wrong? TIA...
(The problem I'm trying to solve is several support personnel needing to connect to the same servers and disconnecting each other mid-session.)

Goar answered 3/3, 2014 at 19:48 Comment(3)
Did you get this working because even I am struggling with the same thing?Jujube
@dilip The OP at this SuperUser link commented that he got past it using PsExec (if that works for you, please comment back): superuser.com/questions/650816/…Cowper
psexec \\remotepc cmd followed by qwinsta worked for me. Thanks!Auvil
A
18

Found on Dell website, this worked for me same issue.

This means the remote RPC component failed to execute the requested operation. It is because it is not allowed to operate on terminal service (Remote Desktop) through RPC by default. To modify this setting to enable Remote Desktop API through RPC, you need to find the following registry key:

HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Then add a DWORD value named “AllowRemoteRPC” and change its value to 1.

In my case it was set to "0". I changed it to 1 and all was good.

Aylsworth answered 4/11, 2014 at 16:38 Comment(3)
That worked for me. Thanks. Here is the cmd: qwinsta console /server:<ip here>Individuation
@M_tek, How did you figure out this registry setting?Harkins
This also applies to the same symptom with query.exe, in which calls to WinStationEnumerateW return false, preventing use of WinStationQueryInformationW.Acquaintance
S
0

Refer to this link for the correct command names and alternatives: http://makezine.com/2007/08/15/howto-kill-terminal-services-s/

You might want to try executing from a cmd window run in administrator-mode.

Can you login any other way? e.g.: mstsc /console or via virtual console? I ask because then you can check the server authentication settings on the servers.

Sob answered 3/3, 2014 at 19:56 Comment(1)
Thanks for the reply. I have been testing in a shell run as Administrator. From the article you linked, it appears as though I have the correct syntax for the command, as well.Goar

© 2022 - 2024 — McMap. All rights reserved.