Use > Data Flow Management > Universal Discovery > Inventory Discovery > How to Edit Pre and Post Scan Scripts

How to Edit Pre-/Post-Scan Scripts

This task describes how to edit pre- and post-scan scripts in your Management Zones.

  1. Prerequisites

    • A Data Flow Probe is installed.
    • A Management Zone is defined.

  2. Navigate to the script editor

    You can access the Pre/Post Scan Script Editor in the following ways:

    • In the Management Zone:

      1. Set up and activate the Inventory Discovery Activity.

      2. On the Preferences Page, click to select Scanner based Inventory Discovery and then click Edit script. The Pre/Post Scan Script Editor opens.

    • From the Adapter Management module:

      Inventory Discovery > Adapters, click Inventory Discovery by Scanner, expand the Global Configuration Files pane, click the PrePostScanScriptingConfiguration file, and click Edit .

  3. Edit the script

    1. Click the platform for which you want to edit a script. Depending on the platform, you might also need to select a version.

      Tip Click All UNIX to create a script that is used as a backup script in case a script for any of the other UNIX variant scripts fails to run.

    2. Click pre scan script or post scan script. The script editing window opens.
    3. Write your script using shell commands that are appropriate for the platform or shell that is running on the discovery node.
  4. (optional) Import resource files

    To include files that your script requires, import them by clicking the Resources node in the left pane and then click . The Import Files dialog box is displayed. Select the files you want to include in the script package.

    Note  

    • When files are transferred to the remote machine, they will not be marked as executables- even if they are executables. Ensure you mark them as executables in the pre/post scripts before running them.
    • Resources files are never removed automatically. If you want to remove them after your scripts run, ensure your scripts perform clean-up operations as needed.

  5. Deploy the scripts

    To deploy and run the scripts, click to select Run Pre/Post Scripts on the Preferences Page of the Inventory Discovery Activity.

  6. Results

    To verify the script is deployed successfully, verify the script file is stored in the same directory as the scanner executable. For more information on the location of the scanner executable, see the section describing scanner file locations in Scanner File Locations.

Related Topics Link IconRelated Information