3
2
I know there are a lot of questions similar to this, but all of them use the following syntax to connect:
runas /netonly /user:[Domain]\[Account on Domain with Administrator access]
[Program]
I need to start/stop services remotely from another Workgroup-linked computer. My problem is my computer is not linked via a domain structure which the syntax seems to imply. Using this opens the program (say cmd), but performing sc \\[Domain\Machine] query
on the opened instance of cmd.exe does not work giving the Access Denied error.
Another alternative I've found elsewhere in StackOverflow is
net use \\[Machine IP/Host name]\IPC$ user:[Account on Machine with
Administrator Access] [Password]
sc \\[Machine] [Command]
In the second case, the first line works if I input the account credentials properly provided the same account isn't used by anyone else in the remote machine...
But the second line fails giving the same access denied error as earlier. I am at my wit's end to solve this problem.
Funnily, the exact situation doesn't seem to be addressed at all elsewhere in the internet, and nobody's complained of requirement of credentials stopping them from using sc
or net start
e.g., remotely. Almost all questions on SO relate to the exact syntax.
The only problem I can identify is if my computer is connected in a Workgroup structure as opposed to the Domain. What is the real issue?
EDIT : An important point to note is that when I say sc \[Machine] start [Service] and I give the name of a non-existent service in the syntax, the error message is something like service does not exist as installed service, but if I enter the name of a valid service, the error is Access Denied..
EDIT 2 : It worked after completely disabling user access control. I assume that isn't the safest way to do it. Are there any alternatives with UAC enabled?
EDIT 3 : I figure it is to do with getting adminstrative priveliges on the remote machine using cmd. How can I achieve that within command line?
3For Windows Server the fix works without restarting – admax – 2016-10-16T16:21:57.393