WMI Remote connection -


There is an issue about WMI connections for Computer B (Windows XP) through ACP.N from Computer A (Windows 2003 Server). I

The error is as follows:

The RPC server is unavailable.

A few steps have been taken to successfully take advantage of WMI connectivity. The basics you definitely should allow remote management on the target box. If you can not do RDP in it, then it is likely that you can not remotely remove anything else. It may also include Windows Firewall issues. Ensure that your request can be reached here.

Next, start simple, can you also vote for the processes running on that box? Try to output all running processes on the target box with System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetProcesses ("machine-name"). If you can get some information on at least the box then the RPC message you are receiving is being done with false arguments, perhaps?

Anyway, I've just written a web application that users find a server on the LAN and kill a target process there or start a new one I did it in C #, so below The given code snippet is used. This is not the best, but it is still working in its production: Public static class remote processes {public static zero kill process bi process ID (string name operator, string domain name, string login, String password, int processID) {// # 1 this static method # variant /// & lt; Variables & gt; For wars ... string user name; String password; String machinename; String Maidman; Hashtable HS = new hashtable (); Management soscope mscope; Connection options cnOptions; Management Object Finder Objesier; Management Operation Observers Ops Observers; Management class management class; Directory entry entry; Directory searcher explorers; Directory Finder User Finder; #endregion // # 2 method sets the basics sent in the machine = name = server; MyDomain = DomainName; User name = log in; Password = password; CnOptions = New Connection Option (); CnOptions.Imersonation = Tampering Disorder; CnOptions.EnablePrivileges = True; CnOptions.Username = myDomain + "\\" + userName; CnOptions.Password = Password; MScope = new management scope (@ "\\" + machinename + @ "\ root \ CIMV2", cnoptions); // # 3 Start the connection to the remote box mScope.Connect (); ObjSearcher = New ManagementObjectSearcher (String.Format ("Choose from Win32_Process * where ProcessID = {0}", processID)); OpsObserver = new management operation (); ObjSearcher.Scope = mScope; String [] sep = {"\ n", "\ t"}; // # 4 through the loop foreach (objSearcher.Get) Management object obj) {string caption = obj.GetText (TextFormat.Mof); String [] split = caption.Split (sep, StringSplitOptions.RemoveEmptyEntries); // To split (int i = 0; i & lt; split.Length; i ++), repeat through the splitter {if (split [i]. Split ('='). Length & gt; ; 1) {string [] procDetails = split [i] .plit ('='); ProcDetails [1] = procDetails [1] Change (@ "" "," "); ProcDetails [1] = procDetails [1] Change (';', ''); Switch (procDetails [0]. Trim (). ToLower ()) {// You Here you can search for any property and do something else, case "processid": int tmpProc = Convert.ToInt32 (procDetails [1]. ()); // If the process ID is near par ... // (This is redundant because we should limit that question to the top, where the above question is, but we have gone crazy here (tmpProc.Equals (processID)) {Obj.InvokeMethod (Ops Observer, "Terminate", blank) );} Brake;} // and Pro Es id switch ...} // end our if statement ...} // our for loop end ...} / / our end for each loop ...} // and static method}


Comments