Don,
You can specify which performance counter you want to attach to on which
machine you want through the constructor. There is an overload which takes
a machine name.
If you want to impersonate another user, then you might want to look at
the Impersonate method on the WindowsIdentity class. The documentation for
that method shows how to use it in conjunction with a call to the LogonUser
API to impersonate another user. You will need to do this if you want to
access performance counters on another machine as another user.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Don" <do*******@yahoo.com> wrote in message
news:e7**************************@posting.google.c om...
Hello!
I am trying to write some code to access performance counters on a
remote machine. Ideally, I would like to add a machine to a tree
control (like the "Servers" view in the .NET IDE) and prompt the user
to put in a username/password for that machine. I'm not too familiar
with the security model involved here, and was hoping someone either
has come across this before or could point me in the right direction.
Thanks in advance!
Don