Scanning a Managed Computer

If you change the configuration of an agent computer or install a new computer onto the network, you can prompt the Agent Manager to scan only that computer instead of all managed computers. Scanning only the affected computer takes less time than scanning all managed computers, and allows the Agent Manager to update the affected computer immediately, instead of waiting until the scheduled scan.

To scan a single managed computer, create two custom tasks to run a Microsoft Operations Manager 2000 (MOM) script. The first custom task defines the syntax for scanning an agent computer in the Managed Computers list. The second task defines the syntax for scanning and installing an agent on a new computer. When you run the second task, a window prompts you for the name of the new computer.

You can run the tasks from the Consolidator and associated Agent Manager computer or from a remote MOM Administrator Console computer. If you run the tasks from a remote MOM Administrator Console computer, download and install version 5.1 of the command shell-based Windows Script Host (CSCRIPT.EXE) from the Microsoft Web site at www.microsoft.com. You do not need version 5.1 if you run the tasks from the Agent Manager computer.

To create a task for scanning a single agent computer in the Managed Computers list:

  1. If the computer from which you are running the script is not the Consolidator and associated Agent Manager computer, ensure that the computer has version 5.1 of Windows Script Host (CSCRIPT.EXE) installed.
  2. Start the MOM Administrator Console from the Microsoft Operations Manager program folder.
  3. Expand Microsoft Operations Manager (default) in the left pane.
  4. Click Monitor in the left pane.
  5. Click Action on the menu bar.
  6. Click New on the Action menu.
  7. Click Custom Task.
  8. Select the appropriate user name from the Task Available To list.
  9. Select computer items from the Task Available for list.
  10. Click Add.
  11. In the Name box, type Agent Manager scan this computer.
  12. In the Description box, type Causes the Agent Manager to scan an agent computer.
  13. In the Command box, type:
  14. CSCRIPT.EXE "$Agent Directory$\AMScanSingle.vbs" /a:AGENTMANAGER_COMPUTER_NAME /s:$Computer$

    /a:AGENTMANAGER_COMPUTER_NAME Specifies the name of the Agent Manager computer.

    For example:

    CSCRIPT.EXE "$Agent Directory$\AMScanSingle.vbs" /a:NYC_AM023 /s:$Computer$
    

To create a task for scanning and installing an agent on a new computer:

  1. If the computer from which you are running the script is not the Agent Manager computer, ensure that the computer has version 5.1 of Windows Script Host (CSCRIPT.EXE) installed.
  2. Start the MOM Administrator Console from the Microsoft Operations Manager program folder.
  3. Expand Microsoft Operations Manager (default) in the left pane.
  4. Click Monitor in the left pane.
  5. Click Action on the menu bar.
  6. Click New on the Action menu.
  7. Click Custom Task.
  8. Select the appropriate user name from the Task Available To list.
  9. Select computer items from the Task Available for list.
  10. Click Add.
  11. In the Name box, type Agent Manager scan a new computer.
  12. In the Description box, type Causes the Agent Manager to scan a computer and install an agent.
  13. In the Command box, type:
  14. CSCRIPT.EXE "$Agent Directory$\AMScanSingle.vbs" /a:AGENTMANAGER_COMPUTER_NAME

    /a:AGENTMANAGER_COMPUTER_NAME Specifies the name of the Agent Manager computer.

    For example:

    CSCRIPT.EXE "$Agent Directory$\AMScanSingle.vbs" /a:NYC_AM023
    

To run the custom task to scan an agent computer in the Managed Computers list:

  1. Start the MOM Administrator Console from the Microsoft Operations Manager program folder.
  2. Expand Microsoft Operations Manager (default) in the left pane.
  3. Click Monitor in the left pane.
  4. Click All Computers in the left pane.
  5. In the right pane, click the computer you want to scan.
  6. Click Action on the menu bar.
  7. Click Custom Tasks on the Action menu.
  8. Click Agent Manager scan this computer on the Custom Tasks menu.

To run the custom task to scan and install an agent on a new computer:

  1. Start the MOM Administrator Console from the Microsoft Operations Manager program folder.
  2. Expand Microsoft Operations Manager (default) in the left pane.
  3. Click Monitor in the left pane.
  4. Click All Computers in the left pane.
  5. Click any computer in the right pane. You will specify the new computer in a later step.
  6. Click Action on the menu bar.
  7. Click Custom Tasks on the Action menu.
  8. Click Agent Manager scan a new computer on the Custom Tasks menu.
  9. At the prompt, type the name of the new computer.