Starting a Windows service on a remote computer in a different domain

My computer is in domain A and the remote server in domain B, I want to restart the service on the server from my PC using C # or any other language or script.

Notes:

  • I am connected to the server via VPN, which means that I can manually RDP the server and manually restart the service.
  • I cannot access the services on the server using a connection to another computer under the action button from the local services window.
  • I have administrator rights on the server.
  • I cannot (not allowed) add any components to the server.
  • I have a different credential set for the remote machine.
+5
source share
2 answers

sc, , . , System.ServiceProcess.ServiceController.

, , , . , - A, , , , .

+3

? - :

NET USE \\computername\IPC$ /U:domainname\username password
SC \\computername START service
+3

All Articles