How To: Remove Local Scheduler Tasks from Clients Using a Script

Version 19

    Verified Product Versions

    Endpoint Manager 9.6Endpoint Manager 2016.x

    Description: If it is determined that a local scheduler task should be removed from client computers it can be done through a script run as a scheduled task in the LANDesk Management Suite 32 bit console.



    Create a Query

    1) In the 32 bit console right click on My queries and click New Query


    2) Under Machine Components go to Computer | Device Name

    3) Click Exists and click Insert


    4) Click the button labeled Select Columns

    5) Under Machine Components go to Computer | LANDesk Management | Local Scheduler | Scheduled Tasks

    6) Click on Handle and click the button labeled >>

    7) Click on Executable Path and click the button labeled >>

    8) Name the query "Local Scheduler Handles" and click Save
    9) Run the query and find the Handle number for all of the local scheduler tasks you want to delete
    Note: The default Handle number for Vulscan.exe (security and patch) is 555 and the default Handle number for ldiscn32.exe (inventory scan) is 777
    Creating the script to delete the local scheduler tasks
    1) In the 32 bit console go to Tools | Distribution | Manage Scripts
    2) Right click on my scripts and click New Custom Script
    3) Name the script and click OK
    4) Select all and delete it
    5) Paste the following into the script
    REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\LocalSch.exe<qt/> /del /taskID=HandleID
    6) Change HandleID to the handle number you found in the query - The script in this example will delete the default security scan task
    7) Save the script
    8) Right click on the script and click Schedule
    9) Drag computers into the task and start it