Windows sc.exe command: Access is Denied when querying service on a remote machine

JCS picture JCS · May 1, 2014 · Viewed 7k times · Source

I am trying to query a service on a remote machine using the windows sc command but keep getting the following error [sc] enumqueryservicesstatus openservice failed 5 Access is denied, any body have an idea what exactly i need to change on the remote machine for this to work? User permission? Every user on my remote machine is an administrator. Perhaps some firewall blocking? Or some service not running?

I am running the following command which queries the RemoteRegistry service:

sc \\<remote machine ip address> query RemoteRegistry

Thanks.

Answer

JCS picture JCS · May 8, 2014

Turned off windows UAC on the remote machine, it fixed it.