C# list process on a remote system using macine address+adminname+password ?


I need to have a tool to list processes on a remote servers (our customers)
the tool is part of a program that I'm working on to diagnose the system

the Process.GetProcesses("machine"); does not work, I need a way to enter the machine address + the username/password for the admin manually

our computers are not part of the domains at the customers but we have usernames/passwords with admin access

any help?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The above is an alternative, the one below relates to using GetProcesses()
Data-BaseAuthor Commented:

I will check it now :-)
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Data-BaseAuthor Commented:
wow this is cool

but how I can list the services?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Data-BaseAuthor Commented:

now I get confused !!!

how to use the above with this code?

ConnectionOptions co = new ConnectionOptions();;
co.Username = "administrator"; //any account with appropriate privileges
co.Password = "pppppp";
string remMachine = "machineName";
ManagementScope scope = new ManagementScope(@"\\" + remMachine +
@"\root\cimv2", co);
SelectQuery selectQuery = new SelectQuery("Select Name, SessionId
from Win32_Process");
using(ManagementObjectSearcher searcher =
new ManagementObjectSearcher(scope, selectQuery))
foreach (ManagementObject proc in searcher.Get())
Console.WriteLine("{0}, {1}",proc["Name"].ToString(),

Open in new window

Data-BaseAuthor Commented:
Thanks allot :-)

that was cool
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.