query session command gives error code 5 even when AllowRemoteRPC is set to 1












4















in cmd, 'Query Session' command is returning,



Error 5 getting sessionnames
Error [5]:Access is denied


on Windows 10 Remote desktop - Administrator user.



we have set, AllowRemoteRPC 's value to 1



under this HKLMSYSTEMCurrentControlSetControlTerminal Server



But still problem persists.



Questions:




  • what does AllowRemoteRPC actually do and how it's value is being used.

  • what to do to make Query Session command work.










share|improve this question























  • What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

    – harrymc
    Jan 2 at 9:28













  • @harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

    – Amit
    Jan 2 at 9:31













  • Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

    – harrymc
    Jan 2 at 9:32











  • @harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

    – Amit
    Jan 2 at 15:54











  • @PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

    – Amit
    Jan 5 at 9:37


















4















in cmd, 'Query Session' command is returning,



Error 5 getting sessionnames
Error [5]:Access is denied


on Windows 10 Remote desktop - Administrator user.



we have set, AllowRemoteRPC 's value to 1



under this HKLMSYSTEMCurrentControlSetControlTerminal Server



But still problem persists.



Questions:




  • what does AllowRemoteRPC actually do and how it's value is being used.

  • what to do to make Query Session command work.










share|improve this question























  • What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

    – harrymc
    Jan 2 at 9:28













  • @harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

    – Amit
    Jan 2 at 9:31













  • Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

    – harrymc
    Jan 2 at 9:32











  • @harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

    – Amit
    Jan 2 at 15:54











  • @PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

    – Amit
    Jan 5 at 9:37
















4












4








4


0






in cmd, 'Query Session' command is returning,



Error 5 getting sessionnames
Error [5]:Access is denied


on Windows 10 Remote desktop - Administrator user.



we have set, AllowRemoteRPC 's value to 1



under this HKLMSYSTEMCurrentControlSetControlTerminal Server



But still problem persists.



Questions:




  • what does AllowRemoteRPC actually do and how it's value is being used.

  • what to do to make Query Session command work.










share|improve this question














in cmd, 'Query Session' command is returning,



Error 5 getting sessionnames
Error [5]:Access is denied


on Windows 10 Remote desktop - Administrator user.



we have set, AllowRemoteRPC 's value to 1



under this HKLMSYSTEMCurrentControlSetControlTerminal Server



But still problem persists.



Questions:




  • what does AllowRemoteRPC actually do and how it's value is being used.

  • what to do to make Query Session command work.







windows-10 permissions remote-desktop winapi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 9:03









AmitAmit

786




786













  • What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

    – harrymc
    Jan 2 at 9:28













  • @harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

    – Amit
    Jan 2 at 9:31













  • Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

    – harrymc
    Jan 2 at 9:32











  • @harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

    – Amit
    Jan 2 at 15:54











  • @PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

    – Amit
    Jan 5 at 9:37





















  • What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

    – harrymc
    Jan 2 at 9:28













  • @harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

    – Amit
    Jan 2 at 9:31













  • Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

    – harrymc
    Jan 2 at 9:32











  • @harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

    – Amit
    Jan 2 at 15:54











  • @PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

    – Amit
    Jan 5 at 9:37



















What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

– harrymc
Jan 2 at 9:28







What exactly are you doing? Did you change AllowRemoteRPC to "1" on the receiving computer? Try also in Credential Manager to add the account for the receiving computer. Another try is to disable UAC.

– harrymc
Jan 2 at 9:28















@harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

– Amit
Jan 2 at 9:31







@harrymc I am logging into the RDP, and in CMD I am typing command 'Query Session'. I did change 'AllowRemoteRPC' on that RDP. can you tell me how to disable UAC?

– Amit
Jan 2 at 9:31















Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

– harrymc
Jan 2 at 9:32





Another thing to try is connecting to a share first to establish credentials, or creating a same-named consistent user on both machines.

– harrymc
Jan 2 at 9:32













@harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

– Amit
Jan 2 at 15:54





@harrymc I'm sorry, but I didn't get your suggestions. Basically i want a CMD command 'Query Session' to successfully provide me sessions information. but it is giving me error 5. To solve that I tried to set 'AllowRemoteRPC' with 1. But that didn't help Either.

– Amit
Jan 2 at 15:54













@PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

– Amit
Jan 5 at 9:37







@PimpJuiceIT Yes I'm doing Query Session on cmd. This is case in client's machine and their user is added in Administrator Group (and cmd is opened as Administrator) - So not direct local Admin. But I have tried the same on my network with guest (standard) user and command is working fine. I am doing this via connecting to the machine using remote desktop.

– Amit
Jan 5 at 9:37












1 Answer
1






active

oldest

votes


















1














I think the problem is in the UAC remote restrictions.



Do this on the target computer:




  • Run regedit


  • Navigate to the following registry subkey:



    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem


  • If an entry named LocalAccountTokenFilterPolicy registry entry does not exist,
    create it as DWORD


  • Double-click LocalAccountTokenFilterPolicy and set its value to 1.



Reference:



Microsoft's
Description of User Account Control and remote restrictions in Windows Vista.






share|improve this answer


























  • @Amit: Any comments?

    – harrymc
    Jan 11 at 15:29











  • Sorry Harry, was out these days and could not look into this thread

    – Amit
    Jan 13 at 7:09











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389713%2fquery-session-command-gives-error-code-5-even-when-allowremoterpc-is-set-to-1%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I think the problem is in the UAC remote restrictions.



Do this on the target computer:




  • Run regedit


  • Navigate to the following registry subkey:



    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem


  • If an entry named LocalAccountTokenFilterPolicy registry entry does not exist,
    create it as DWORD


  • Double-click LocalAccountTokenFilterPolicy and set its value to 1.



Reference:



Microsoft's
Description of User Account Control and remote restrictions in Windows Vista.






share|improve this answer


























  • @Amit: Any comments?

    – harrymc
    Jan 11 at 15:29











  • Sorry Harry, was out these days and could not look into this thread

    – Amit
    Jan 13 at 7:09
















1














I think the problem is in the UAC remote restrictions.



Do this on the target computer:




  • Run regedit


  • Navigate to the following registry subkey:



    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem


  • If an entry named LocalAccountTokenFilterPolicy registry entry does not exist,
    create it as DWORD


  • Double-click LocalAccountTokenFilterPolicy and set its value to 1.



Reference:



Microsoft's
Description of User Account Control and remote restrictions in Windows Vista.






share|improve this answer


























  • @Amit: Any comments?

    – harrymc
    Jan 11 at 15:29











  • Sorry Harry, was out these days and could not look into this thread

    – Amit
    Jan 13 at 7:09














1












1








1







I think the problem is in the UAC remote restrictions.



Do this on the target computer:




  • Run regedit


  • Navigate to the following registry subkey:



    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem


  • If an entry named LocalAccountTokenFilterPolicy registry entry does not exist,
    create it as DWORD


  • Double-click LocalAccountTokenFilterPolicy and set its value to 1.



Reference:



Microsoft's
Description of User Account Control and remote restrictions in Windows Vista.






share|improve this answer















I think the problem is in the UAC remote restrictions.



Do this on the target computer:




  • Run regedit


  • Navigate to the following registry subkey:



    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem


  • If an entry named LocalAccountTokenFilterPolicy registry entry does not exist,
    create it as DWORD


  • Double-click LocalAccountTokenFilterPolicy and set its value to 1.



Reference:



Microsoft's
Description of User Account Control and remote restrictions in Windows Vista.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 10 at 9:05

























answered Jan 9 at 16:57









harrymcharrymc

257k14268568




257k14268568













  • @Amit: Any comments?

    – harrymc
    Jan 11 at 15:29











  • Sorry Harry, was out these days and could not look into this thread

    – Amit
    Jan 13 at 7:09



















  • @Amit: Any comments?

    – harrymc
    Jan 11 at 15:29











  • Sorry Harry, was out these days and could not look into this thread

    – Amit
    Jan 13 at 7:09

















@Amit: Any comments?

– harrymc
Jan 11 at 15:29





@Amit: Any comments?

– harrymc
Jan 11 at 15:29













Sorry Harry, was out these days and could not look into this thread

– Amit
Jan 13 at 7:09





Sorry Harry, was out these days and could not look into this thread

– Amit
Jan 13 at 7:09


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389713%2fquery-session-command-gives-error-code-5-even-when-allowremoterpc-is-set-to-1%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...