Error:1722 Getting session names
Asked Answered
A

3

12

I am trying to check if anybody is connected to the server in my team with the following command: query session /server:<SERVERNAME>. But Every time I end up getting the following error:

Error:1722 getting session names.

Error[1722]: The RPC sever is unavailable.

I have already tried with qwinsta but i get the same issue in there too. Is there anyway to get around the issue and get the required?

Acre answered 24/6, 2015 at 8:43 Comment(0)
M
7

launch regedit.exe (You have to be administrator to do that) goto:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

and change AllowRemoteRPC from the value 0 to the value 1 on each machine which should be able to receive a message

Magnoliamagnoliaceous answered 28/7, 2015 at 10:38 Comment(2)
ps. here's a PowerShell script to wrap the query session function, which will apply the above registry setting if required to do so when the -Force parameter is added: gist.github.com/JohnLBevan/8173b2b8aeb84b0c0f4b48900e43a478Victualage
Or simply REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v AllowRemoteRPC /t REG_DWORD /d 1 /fMoving
F
1

For me, the one Windows Server 2012 R2 giving this error was fixed by adding the following rule. None of the 97 other had the issue.

netsh advfirewall firewall add rule name="Open Port 135 RPC" dir=in action=allow protocol=TCP localport=135
netsh advfirewall firewall add rule name="Open Port 135 RPC" dir=in action=allow protocol=UDP localport=135
netsh advfirewall firewall add rule name="Open Port 445 RPC" dir=in action=allow protocol=TCP localport=445
netsh advfirewall firewall add rule name="Open Port 445 RPC" dir=in action=allow protocol=UDP localport=445
Feu answered 7/12, 2017 at 9:46 Comment(0)
B
0

Try sharing a folder in the target computer, also store credentials of target user in the source computer.

eg:msg /Server: targetipaddress targetUsername "Message"

Benitabenites answered 22/6, 2018 at 7:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.