How to configure and run procedures on managed devices

Release Time
06/03/2020
Views
2610 times
Category
Procedures
Tags


Click 'Configuration Templates' > 'Procedures'

  • Procedures are standalone instruction scripts and patches for Windows devices and Mac devices.
     
  • You can use procedures to identify and fix issues, monitor resources, and run patches.
     
  • There are two types of procedure:
     
    • Script procedures - Execute specific tasks like install an application, perform a file operation, or manage user accounts.
       
    • Patch procedures - Install updates to the device operating system and to third party applications
       
  • Windows – run script and/or patch procedures. Mac devices – custom script procedures only.
     
  • Endpoint Manager ships with pre-defined procedures to handle a range of tasks and patch operations.
     
  • You can also create custom procedures to accomplish tasks of your choice.
     
    • You can write your own Python script in the built-in editor, or import a saved script in .json format
       
    • Procedures must be approved by an admin before you can apply them to devices
       
    • You run procedures on-demand, or add them to a profile with a schedule.
       
  • This article explains how to create a procedure and run it on managed devices.

Use the following links to jump to the task you need help with:

The procedures interface & pre-defined procedures

  • Login to Comodo One/ Xcitium
     
  • Click 'Applications' > 'Endpoint Manager'
     
  • Click 'Configuration Profiles' > 'Procedures'


There are two categories of procedures:

  • Predefined Procedures- two types: 'Script' and 'Patch' procedures
     
    • EM does not support patch procedures for MAC devices, and there are currently no predefined procedures for MAC. You can only create custom procedures.
       
  • My Procedures - custom procedures that you create.

You cannot edit a predefined procedure, but you can clone one and modify it to create a custom procedure

The sub-folders under 'Pre-defined Procedures' contain procedures in various categories:

  • Application - Scripts to run tasks on Comodo and 3rd party applications. Examples include install/uninstall applications, kill running applications, get details on running processes, and many other useful scripts.
     
  • C1 Integration -  Scripts to ensure your Comodo One/ Xcitium environment runs smoothly. Examples include generate a patch report, run a backup operation, and restart the communication client.
     
  • File Operations - Copy/move/delete files, find and remove duplicates, compress/decompress folders, clean up temporary files, and more.
     
  • Monitors - Scripts to generate alerts or run specific tasks if a condition is met. For example, 'Alert me if a USB drive connects to the system'.
     
  • Network - Scripts to run tasks on, or get information about, your network. For example, view TCP/IP settings, save/restore network configurations, clear DNS cache and more.
     
  • Patch Deployment - Install and update patches in different categories.
     
  • Reports - Procedures to obtain various system logs.
     
  • System - Reboot devices, create restore points, enable/disable USB ports, map network drives, run disk defrag, fix disk errors, and more.
     
  • Task Scheduler - Create new tasks and schedule them.
     
  • User Accounts - Add/remove domain users to a group, enable/disable user access control (UAC), get UAC status, and more.

You can run a predefined procedure at any time on managed devices. See Run a procedure on managed devices for help with this.

Create a custom procedure

Endpoint Manager lets you create custom script/patch procedures to achieve specific tasks. Click the following links to find out more:

Create a Windows script procedure

  • Click 'Configuration Templates' > 'Procedures'
     
  • Click 'Create' > 'Create Windows Script Procedure'


 

  • Enter a name and description and specify the folder where it should be saved. If required, you can create new sub-folders under 'My Procedures'.
     
  • Click 'Create'. After saving, you will be taken to the procedure configuration screen:

 

  • Click 'Edit' to modify the basic settings:



     
    • Alert settings - You can view the settings of the default alert in 'Configuration Templates' > 'Alerts'. You can create custom alert settings if required from this interface. See this wiki for help on viewing and managing alerts. 
       
  • Click 'Save' to save your settings.
     
  • Click the 'View Procedure' tab followed by 'Edit'. Use the built-in text editor to compose your Python script:
     


 

  • You can include variables whose values are dynamically inserted when the procedure runs:
     
    • Click the 'View Procedure' tab followed by 'Edit'
       
    • In the text editor, type the parameter name and enter the value as itsm.getParameter ('parameter name'). Examples:

          Age = itsm.getParameter('age')
          
          Year = itsm.getParameter('year')
       
    • The variables will become available in the 'Parameters' tab. You can define the type, label, and value of each parameter.
       
    • Click the 'Parameters' tab after completing the script under the 'View Procedure' tab

      An example is shown below:


       
    • Type - Choose the category of a variable. The supported types are:

      Integer

      Double

      String

      List
       
    • EM Label - Enter a name for the variable.
       
    • Default Value - Enter a value for the parameter to be taken when no value is input during run-time
       
  • Click 'Save'
     
  • After saving your script, you need to approve it before it is allowed to run on managed devices.

Create a Windows OS patch procedure

  • Click 'Configuration Templates' > 'Procedures'
     
  • Click 'Create' > 'Create Windows Patch Procedure'


 

  • Enter a name and description and specify the folder where it should be saved. If required, you can create new sub-folders under 'My Procedures'.
     
  • Click 'Create'. After saving, you will be taken to the procedure configuration screen:




     
    • Alert settings - You can view the settings of the default alert at 'Configuration Templates' > 'Alerts'. You can create custom alert settings if required from this interface. See this wiki for help with alert templates. 
       
  • Click the 'Execution Options' tab followed by the 'Edit' button. You can select the Microsoft software updates required for the procedure from the options.
     

 

  • Click the link 'Read the definitions from Microsoft website' link to view patch details.
     
  • Choose which types of patch the procedure should install and click 'Save'
     
  • Click the 'Restart Control' tab followed by the 'Edit' button to configure restart options for the endpoint after the procedure has run successfully.
     


 

Force reboot in… - Restart the endpoint a certain period of time after the procedure has completed.

Suppress the reboot - Do not restart the endpoint

Warn about the reboot - Show a notification to the user and let them postpone the restart. Type a message for the user if you choose this option.

Click 'Save'. After saving, your patch procedure becomes automatically approved, added to the 'Procedures' list and can be deployed in a profile.

Create a Windows third-party application patch procedure

  • Click 'Configuration Templates' > 'Procedures'
     
  • Click 'Create' > 'Create Windows 3rd Party Patch Procedure'


 

  • Enter a name and description for your 3rd party patch procedure, and specify the folder in which you want to save it. After saving, you will be taken to the procedure configuration screen:




    Click the 'Execution Options' tab followed by the 'Edit' button:


     
    • Select 3rd party software to update - Choose whether all applications are updated or only specific applications.
       
    • Update all applications - All outdated applications on the endpoint will be updated on running the procedure.
       
    • Update only the selected applications - Select this option if you only want to update specific applications.
       
      • Type the application name in the field provided
         
      • Select the application from the list
         


 

  • Click 'Save'
     
  • Click the 'Restart Control' tab followed by the 'Edit' button to configure endpoint reboot options.
     


Force reboot in… - Restart the endpoint a certain period of time after the procedure has completed.

Suppress the reboot - Do not restart the endpoint

Warn about the reboot - Show notification to the user and let them postpone the restart. Type a message for the user if you choose this option.

Click 'Save'. After saving, your patch procedure becomes automatically approved, added to the 'Procedures' list and can be deployed in a profile.

Create a Mac OS script procedure

  • Click 'Configuration Templates' > 'Procedures'
     
  • Click 'Create' > 'Create macOS Script Procedure'


 

  • Enter a name and description and specify the folder where it should be saved. If required, you can create new sub-folders under 'My Procedures'.
     
  • Click 'Create'. After saving, you will be taken to the procedure configuration screen:
     


 

  • Click 'Edit' to modify the basic settings:




     
    • Alert settings - You can view the settings of the default alert in 'Configuration Templates' > 'Alerts'. You can create custom alert settings if required from this interface. See this wiki for help on viewing and managing alerts.
       
  • Click 'Save' to save your settings.
     
  • Click the 'View Procedure' tab followed by 'Edit'. Use the built-in text editor to compose your Python script:


 

  • You can include variables whose values are dynamically inserted when the procedure runs:
     
    • Click the 'View Procedure' tab followed by 'Edit'
       
    • In the text editor, type the parameter name and enter the value as itsm.getParameter('parameter name'). Examples:

          Age = itsm.getParameter('age')

          Year = itsm.getParameter('year')
       
    • The variables will become available in the 'Parameters' tab. You can define the type, label and value of each parameter.
       
    • Click the 'Parameters' tab after completing the script under the 'View Procedure' tab

      An example is shown below:


       
    • Type - Choose the category of variable. The supported types are:

          Integer

          Double

          String

           List
       
    • EM Label - Enter a name for the variable.
       
    • Default Value - Enter a value for the parameter to be taken when no value is input during run-time
       
  • Click 'Save'
     
  • After saving your script, you need to approve it before it is allowed to run on managed devices.

Import a procedure

  • Comodo One/ Xcitium hosts a plethora of scripts for various tasks at https://scripts.comodo.com
     
  • You can download procedures in .json format and modify them for your requirements
     
  • You can also create your own python scripts and save it in .json format
     
  • Scripts can be imported into EM and added as new custom procedures

Let’s get started:

  • Click 'Configuration Templates' > 'Procedures'
     
  • Click 'Import' at the top


 

  • Click 'Browse', navigate to the location where the procedure file is saved and click 'Open'

The selected file is shown on the 'Import Procedure' dialog.
 


 

The procedure is imported and placed in the  'My Procedures' folder. The procedure name is prefixed with “Imported” to distinguish it from other procedures.
 


 

  • After saving your script you need to approve it before it is allowed to run on managed devices.

Approve a new procedure

  • New custom script procedures are given an initial status of 'Created'.
     
  • Custom script procedures must be approved before they can be added to a profile.
     
  • Custom patch procedures do not require approval.

    The review/ approval process:

    Script writer -
     
    • Go to 'Configuration Templates' > 'Procedures' and create a new script procedure.
       
    • Save the procedure in 'My Procedures' (or a sub-folder).
       
    • The procedure will have a status of 'Created'.
       
    • Click the name of the new procedure to open its configuration screen.
       
    • Click the 'Ready to Review' button

      Approver -
       
    • Receives a notification that a procedure requires approval
       
    • Go to 'Configuration Templates' > 'Procedures' and open the procedure details page
       
    • Click 'Approve' to commit the script and make it available for selection in profiles
       
    • Clicks 'Decline' to reject the script

Notes:

  • The writer and approver in the example above can be the same person.
     
  • The specific permissions required to approve a procedure are:

           'manage.procedures' and 'manage.procedures.manage'

  • Both these permissions are enabled in the 'admin' and 'technician' roles
     
  • Make sure these permissions are enabled in a custom role if its members are to approve procedures. See this wiki for more details on this. 


 

  • Only approved procedures can be run on managed devices or added to a profile.

Run a procedure on managed devices

There are six ways to run procedures:

  • The 'Procedures' interface - Click ‘Configuration Templates’ > ‘Procedures’ > select a procedure > Click ‘Run’.
     
  • On selected devices - Click ‘Devices’ > ‘Device List’ > select target devices > Click ‘Run Procedure’
     
  • On selected device groups - Click ‘Devices’ > ‘Device List’ > Group Management > select target device groups > Click ‘Run Procedure’
     
  • On selected user devices - Click ‘Users’ > ‘User List’ > select target users > Click ‘Run Procedure’
     
  • On devices of selected user groups - Click ‘Users’ > ‘User Group’ > select target groups > Click ‘Run Procedure’
     
  • Schedule in a  profile -  Click ‘Configuration Templates’ > ‘Profiles’ > click on a profile name > Click ‘Add Profile Section’ > ‘Procedures’. See this wiki for help to schedule a procedure in a profile.

Notes:

  • EM does not support patch procedures on Mac devices.
     
  • For Windows devices, make sure patch management is allowed in the profile active on the devices. See this wiki for more details. 

Run a procedure from the 'Procedures' interface

  • Click 'Configuration Templates' > 'Procedures'
     
  • Browse the folder tree to locate the procedure you want to run
     
  • Select the procedure and click 'Run' at the top. Note - only approved procedures can be applied. You can also run only one procedure at a time.


 

  • Choose the execution options from the 'Run Procedure' dialog
     
    • All Devices - The procedure will be applied to all devices with the operating system of the procedure you chose.
       
    • Selected device(s) - Enter the name of the Windows or Mac device partly or fully and select the device from the list. You can also add multiple devices in the field.
       
    • Selected device groups - Enter the name of the device group partly or fully and select the group from the list. You can also add multiple groups. The procedure Is run only on devices with the operating system of the procedure you choose.
       
    • Selected User(s) - Enter the name of the user partly or fully and select the user from the list. Repeat the same to add several users. The procedure Is run only on devices with the operating system of the procedure you choose.
       
    • Selected User group(s) - Enter the name of the user group partly or fully and select the group from the list. Repeat the same to add several groups. The procedure Is run only on devices with the operating system of the procedure you choose.
       
    • Selected customer(s) - Enter the name of the customer partly or fully and select the customer from the list. Repeat the same to add several customers. The procedure Is run only on devices with the operating system of the procedure you choose. (MSPs only)


 

  • Send the resulting logs by email - Script procedures only.
     
    • Send to current user - Procedure results are sent to the admin who is currently logged into Endpoint Manager.
       
    • Send to the following email addresses - Add email addresses to whom log results should be sent.
       
  • Run as Local System User / Run as Logged in user - Choose the user account under which the procedure will run on the target devices. Please note this option is not available for a patch procedure.
     
  • Maintenance window status - Details of any maintenance windows in the device’s profile. See this wiki for help with maintenance windows.  (Windows devices only)
     
    • Total number of devices outside of maintenance window - The number of devices that are not part of a maintenance window. The procedure can run on these devices.
       
    • Number of devices blocked by maintenance windows settings - The number of devices on which you cannot run the procedure because the admin has blocked procedures outside the maintenance window.
       
    • Number of devices warned by maintenance window settings - The number of devices that are part of a maintenance window and have warnings enabled. You can still run the procedure on these devices.
       
    • Skip devices warned by maintenance windows settings - A maintenance window is a time-slot reserved for running important tasks on target devices. Admins can enable a warning if somebody attempts to run a procedure outside of the window.  This setting will skip those devices which have been added to a maintenance window with warnings enabled.
       
  • Configure parameters - Available only for script procedures defined with variable parameters and allows you to enter the values for them.
     
    • Click 'Configure Parameters'



      The list of variable parameters appear with their default values pre-populated in their respective text fields
       
    • Enter the value for each parameter in the respective text box
       
    • Select 'Use default value' if you want the default value to be applied for a parameter
       
    • Click 'Apply'
       
  • Click the 'Run' button in the 'Run Procedure' dialog.

The procedure is applied to the selected devices.

Run a procedure from the 'Device Management' interface

  • Click 'Devices' > 'Device List'
     
  • Click the 'Device Management' tab in the top menu
     
    • Select a company or a group to view just their devices

      OR
       
    • Select 'Show all' to view every device enrolled to EM
       
  • Select the Windows or Mac devices on which you want to run a procedure
     
  • Click 'Run Procedure'. ( or click 'More...' and choose 'Run Procedure' from the options)


 

  • Start typing the name of the Windows or Mac procedure you want to run and select the procedure from the suggestions
  • Select your options in the 'Run Procedure' dialog and run the procedure as explained above.

Run a procedure from the 'Group Management' interface

  • Click 'Devices' > 'Device List'
     
  • Click the 'Group Management' tab in the top-menu
     
    • Select a company to view just their groups

      Or
       
    • Select 'Show all' to view every device group
       
  • Select the target device groups on whose member devices you want to run a procedure
     
  • Click 'Run Procedure'.


 

  • Start typing the name of the Windows or Mac procedure you want to run and select the procedure from the options
     
  • Select your options in the 'Run Procedure' dialog and run the procedure as explained above.
     
  • The procedure is run on devices in the selected groups, depending on the operating system of the procedure you chose.

Run a procedure from the 'User List' interface

  • Click 'Users' > 'User List'
     
  • Select the target users on whose devices you want to run the procedure
     
  • Click 'Run Procedure'.


 

  • Start typing the name of the Windows or Mac procedure you want to run and select the procedure from the options.
  • Select your options in the 'Run Procedure' dialog and run the procedure as explained above.
     
  • The procedure is run on devices belonging to the selected users, depending on the operating system of the procedure you chose.

Run a procedure from the 'User Groups' interface

  • Click 'Users' > 'User Groups'
     
  • Select the target user groups on whose member devices you want to run the procedure
     
  • Click 'Run Procedure'.


 

  • Start typing the name of the Windows or Mac procedure you want to run and select the procedure from the options.
  • Select your options in the 'Run Procedure' dialog and run the procedure as explained above.
     
  • The procedure is run on devices belonging to users in the selected user groups, depending on the operating system of the procedure you chose.