Inventory on the presence of a directory
search cancel

Inventory on the presence of a directory

book

Article ID: 384169

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

How to inventory the presence of some directories on the machines ?

Example : 
Find all machines which have directory c:\temp or d:\temp

Environment

CA Client Automation - All Versions

Resolution

Inventory of presence of some directories could be made using a dms script generating an additional inventory.

  1. Download attached file Directory_Inventory.dms

    This script contains following lines at the beginning :

    iNBDirectory=2
    sDirectoryName[1]="c:\temp"
    sDirectoryName[2]="d:\temp"
    'sDirectoryName[3]="c:\temp2"

    Inventory of 2 directories are configured : c:\temp, and d:\temp.
    But these lines could be adapted for different directories or more directories.


  2. Create a new Asset Job of type Script :



    Give it a new (ex: Directory Inventory)


    In script tab copy/paste the content of file Directory_Inventory.dms



    In Scheduling Options, check the option "This job is allowed to run unattended" in Miscellaneous tab.


    Click FINISH

  3. Link this job to all computers or a group of computers.

  4. After execution of the AMAgent on the machines you should see an additional inventory "Directory Inventory" with value Yes or No for different configured Path



  5. This inventory could be used in Query to find all machines which have a directory c:\temp


Attachments

Directory_Inventory.dms get_app