I have 10 remote servers with one local account on each of them. I want to create a C# application that displays owners of certain processes on these servers.
ITerminalServer server = manager.GetLocalServer();
server.Open();
try
{
foreach (ITerminalServicesSession session in server.GetSessions())
{
MessageBox.Show("open");
if (session.ConnectionState == ConnectionState.Active || session.ConnectionState == ConnectionState.Disconnected)
{
string ip = session.ClientIPAddress.ToString();
System.Collections.Generic.IList<Cassia.ITerminalServicesProcess> list = session.GetProcesses();
int count = list.Count;
Cassia.ITerminalServicesProcess item;
for (int k = 0; k < count; k++)
{
// trolls working hard on processes
}
}
}
}
catch { MessageBox.Show(":(");}
Now, this app would have to be run on each of the remote servers each time a user logs in. I want every external user to have their own app, on their Desktop. I wanted to user GetRemoteServer("servername"), but I can't get it to work.
When I change the very top line to ITerminalServer server = manager.GetLocalServer("192.168.0.218"), I am not getting a MessageBox - the execution skips to the catch section...
I read some posts about computer not being in the same DOMAIN. As far as I know, none of the computers here are in a domain. Am I missing something?
Please help.
Thanks!!