how to access romote windows service with Related ObjectQuery
问题 I want to control (start and stop) a windows service which is in the remote machine. I can connect that machine but I can't access to windows service. Here is my code. Can you help me? ConnectionOptions oConn = new ConnectionOptions(); oConn.Username = "****"; oConn.Password = "****"; ManagementScope managementScope = new ManagementScope(@"\\***.***.***.***\root\CIMV2", oConn); managementScope.Connect(); RelatedObjectQuery roq = new RelatedObjectQuery("Win32_Service.Name='KanAktarim'");