ConnectionOptions connection = new ConnectionOptions();
//just username, without domain name, otherwise, a "RPC is Unavaliable." exception will be thrown.
connection.Username = "testUser";
connection.Password = "testPassword";
//Allow privilege
connection.EnablePrivileges = true;
connection.Impersonation = ImpersonationLevel.Delegate;
connection.Authentication = AuthenticationLevel.Call;
//Neither ntdlmdomain or kerberoes, otherwise, a "Invalid Parameter." exception will be thrown.
connection.Authority = "ntlmdomain:MYDOMAIN";
//IP Address or host full name.
ManagementScope scope = new ManagementScope("\\\\myIPAddress\\root\\CIMV2", connection);
scope.Connect();
ManagementClass classInstance = new ManagementClass(scope,new ManagementPath("Win32_Process"), null);
ManagementBaseObject inParams = classInstance.GetMethodParameters("Create");
//Change it to your own execute file path
inParams["CommandLine"] = "myExecuteFilePath";
ManagementBaseObject outParams = classInstance.InvokeMethod("Create", inParams, null);