Symantec Management Platform (Notification Server)

 View Only
  • 1.  Custom inventory for specific folder

    Posted Jul 29, 2015 04:52 AM

    Can we create a custom inventroy to scan specific folder is present in drive or not?



  • 2.  RE: Custom inventory for specific folder

    Broadcom Employee
    Posted Jul 29, 2015 05:28 AM

    Hi Sangita,

    Not sure about inventory, but you may detect folder presence by running simple script task with dir command.  If folder, specified in dir command will not be found then task will fail, if found, then task will pass. And it is pretty easy to build job that will use results of such task in condition to perform actions depending on task status.

    If, but some reason, you with to rely on policy for the task delivery then it is possible to use "Client Task Schedule" (this is actually policy; might be created using right-click menu in "Manage ->Jobs and Tasks") and add dir task into it.

    HTH,

    Alex.

    symc_dir_for_folder_0.png



  • 3.  RE: Custom inventory for specific folder

    Posted Jul 30, 2015 03:34 AM

    Thanks so much



  • 4.  RE: Custom inventory for specific folder

    Posted Jul 30, 2015 05:48 AM

    Hello Alex

     

    I tried to perform the step given by you but when I'm running that task it is running both condition If condition as well as else condition on client machine and giving both result. kindly assist for the same.



  • 5.  RE: Custom inventory for specific folder

    Trusted Advisor
    Posted Oct 09, 2015 07:45 AM

    You can create a custom inventory for file presence with powershell. If the file is present it will return data in not the field will be NULL or blank.

    1. Create Custom Data Class

    2. Create Run Script Task  

    Here is a good powershell script to find vmare tools. You can customize to find your file.

    #************************DO NOT EDIT********************************

    $nse = New-Object -com Altiris.AeXNSEvent

    $nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"

    $nse.Priority = 1

    #************************DO NOT EDIT********************************

     

    #Modify this varaible with the custom data class guid

    $strDataClassGuid = "{this is where your csutom data class guid goes}"

     

    $objDCInstance = $nse.AddDataClass($strDataClassGuid)

    $objDataClass = $nse.AddDataBlock($objDCInstance)

     

    #Add new row of data

    $objDataRow = $objDataClass.AddRow()

     

    # Gather relevant VMWare information

     

                                    $vmware = Get-Item 'C:\Program Files\VMware\VMware Tools\vmtoolsd.exe'

                                    $vmwareVersion = $vmware.VersionInfo.FileVersion

     

                                    $VMToolsAgent = Get-Service -Name 'VMTools' | %{$_.DisplayName}

                                    $Status = Get-Service -Name 'VMTools' | %{$_.Status}

                                    $StartUpType = gwmi win32_service -filter "Name='VMTools'" | Select-Object StartMode | %{$_.StartMode}

     

                                   

     

     

    #Adds data to the columns

    $objDataRow.SetField(0, $vmwareVersion)

    $objDataRow.SetField(1, $VMToolsAgent)

    $objDataRow.SetField(2, $Status)

    $objDataRow.SetField(3, $StartUpType)

     

    #Send the data

    $nse.SendQueued()

     

    4. Create a policy and add in disable powershell signing policy, your task, enable powershell signing policy.