Jump to content

Cmoputer Management Console Functions

- - - - -

  • Please log in to reply
No replies to this topic

#1
tygernet

tygernet

    Newbie

  • Members
  • Pip
  • 1 posts
I am using VB .net 2008
I am trying to perform functions commonly found in the Computer Management Console.

I have found some information about writing snap ins for the tool, and an SDK to write snap ins, but no API for using the components of the tool.

Specifically, I want to kill processes on remote computers to which I have admin access when I see that the file is opened by a specific user (or machine). The files are being run from one of several servers, and each server must be checked. There are several files in each list, and the file names change from list to list. For example, I have a file with a list of filenamess (changing with each iteration) including FOO1.EXE..FOO127.EXE, all of which live on SRVR1..SRVR16.

In the Computer Management Console, when I look at SRVR1, I see that
FOO1.EXE is open (in use) by User1, User543, and User837.
FOO27.EXE is in use by User7, User43, and User 55.
I can use the console function to disconnect the users from each file, and then move on to SRVR2.

I need to do this programatically:
connecting to a server,
stepping through my list of files,
disconnecting users from the files,
disconnecting from the server,
connecting to another server,
and repeating the process across all the servers.

If I want to brute force it....

I know how to use System.IO to find and parse files, and I have seen discussions of various ways to overload system.Management functions to execute a specified command on a remote machine. But I also found lots of handy tools like PSfile/PSkill that allow me to to step through the >1K workstations which could be using the files, check for the files in the list, kill any that are open, and move on, all without having to overload for remote execution because PSutilities do that for me...

Alas, that approach sounds like a waste of resources and a process that would take a bit longer than having someone step through the servers manually with Computer Management Console.

Any pointers would be appreciated greatly!
Ray




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users