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.
- Start the console, click Authoring and then expand Management Pack Objects
- Right-click Tasks and choose to create a new task
- In the Create task wizard – Task Type, choose Agent Task and Command line, choose your destination management pack and click Next
- 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
- 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.