options.Username = UserName;
options.Password = PassWord;
ManagementScope Conn = new ManagementScope(@"\\" + IP + @"\root\cimv2", options);
Conn.Connect();
ManagementPath path = new ManagementPath("Win32_Process");
ManagementClass processClass = new ManagementClass(Conn, path, null);
ManagementBaseObject inParams = processClass.GetMethodParameters("ChangeStartMode");
//Parameters for creation of process.
inParams["StartMode"] = "Auto";
//Invoke Method.
ManagementBaseObject outParams = processClass.InvokeMethod("ChangeStartMode", inParams, null);