Client Management Suite

 View Only
  • 1.  Custom Inventory

    Posted Jul 08, 2016 02:37 PM

    I have followed several articles on creating a custom inventory script.  They each differ.  I do not know scripting, powershell, etc.  I have created the new data class  but cannot figure out how to create the custom inventory.  It is a simple one-I just need to collect the drive letter and directory names.  Do not need the files. Is there anyone that can write this so I can get on with this? Desparate at this point. BTW, this would be for Windows.



  • 2.  RE: Custom Inventory

    Posted Jul 12, 2016 09:18 AM

    Here it is nice article:

    https://support.symantec.com/en_US/article.HOWTO10487.html

    Also I think drives and directory names you can see in Software inventory in Policies\Discovery and inventory\Inventory.



  • 3.  RE: Custom Inventory

    Posted Jul 12, 2016 09:25 AM

    Thank you.  I have been trying to follow this article. Just not getting any data into the table created.  Following several different vbs scripts, each with  different query for the same thing- folders on the root of C. Not knowing vbs or powershell is part of my problem.

    I was just hoping that someone could give me the entire script to get the c:\Folder names and  the second part of  the script to send it to  the database.



  • 4.  RE: Custom Inventory

    Posted Jul 22, 2016 04:42 PM

    That's pretty simple.  Here;s a good powershell book   https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617291080

     

     

    # Powershell example
    # Following is a sample custom inventory script gathering information about processor of a machine and posting data
    # to NS using Altiris NSE Component

    # Create instance of Altiris NSE component
    # Please don't modify this GUID -->
    $nse = New-Object -com Altiris.AeXNSEvent
    $nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
    $nse.Priority = 1
    #<--

    # Modify this varaible with the custom data class guid
    $objDCInstance = $nse.AddDataClass("{e8220123-4987-4b5e-bc39-ec6eaea312ef}")
    $objDataClass = $nse.AddDataBlock($objDCInstance)

    #Gather Processor Information
    $procDataSet = Get-ChildItem c:\ -Name
    ForEach( $proc in $procDataSet)
    {
    #Add new row of data
    $objDataRow = $objDataClass.AddRow()
    $objDataRow.SetField(0, $proc.Foldername )
    }
        
    #Send the data
    $nse.SendQueued()