Home » System Center Operations Manager 2007 » How to list a file from a agent managed computer

How to list a file from a agent managed computer

A saw a question in a news group about listing files on agent managed computers from the web console in Ops Mgr 2007. After some thinker and discussion with Mikael Nyström I found the solution. First, it has to be a agent task to show up in the web console. In this example I will list the C:\WINDOWS\win.ini file on the agent managed computer, in the real world it could be for example a logfile from a application. The result will be shown in the task result box.

  1. Start the console, click Authoring and then expand Management Pack Objects
  2. Right-click Tasks and choose to create a new task
  3. In the Create task wizard – Task Type, choose Agent Task and Command line, choose your destination management pack and click Next
  4. In the Create task wizard – General Properties, input a task name, a description and choose target, for example Windows Server 2003 Computers as target. Click Next
  5. In the Create task wizard – Command Line, input
    Full path to file: C:\WINDOWS\SYSTEM32\cmd.exe
    Parameters: /C type %WINDIR%\WIN.INI
    You dont have to input a working directory. Click Create

Now, open the web console (http://servername:51908) and test your new task.