Skip to main content

SentinelOne Deployment

Summary

This task deploys the SentinelOne agent on Windows, Linux, and Mac machines.

Sample Run

Sample Run 1

Sample Run 2

Dependencies

SentinelOne Deployment

Variables

NameDescription
S1SiteTokenSite Token to install SentinelOne agent
OutputOutput of the previously executed PowerShell script.

Task Creation

Create a new Script Editor style script in the system to implement this task.

Task Creation 1 Task Creation 2

Name: SentinelOne Deployment
Description: This task deploys the SentinelOne agent on Windows, Linux, and Mac machines.
Category: Security
Task Creation 3

Task

Navigate to the Script Editor section and start by adding a row. You can do this by clicking the Add Row button at the bottom of the script page.

Add Row

A blank function will appear.

Blank Function

Row 1 Logic: If/Then/Else

Row 1 Logic

ROW 1a Condition: Custom Field Contains

Select the Custom Field from the dropdown menu.

Select Custom Field 1 Select Custom Field 2

Search and select the SentinelOne Group Key custom field, type NA in the comparator, change "Contains" to "Does Not Equal," and press Enter.

Condition Setup

ROW 1b Function: Set Pre-defined Variable

Search and select the Set Pre-defined Variable function.

Set Pre-defined Variable 1 Set Pre-defined Variable 2

The following function will pop up on the screen:

Set Pre-defined Variable Function

  • Type S1SiteToken in the Variable Name field.
  • Select the Custom Field radio button.
  • Search and select the Site-level SentinelOne Group Key custom field in the Search Custom Field field.
  • Click the Save button to save the changes.
  • Select Windows as the Operating System.

Windows Selection 1 Windows Selection 2

ROW 1c Function: Set Pre-defined Variable

Repeat the Row 1b steps but limit the pre-defined variable to Mac machines.

MAC Selection 1 MAC Selection 2

ROW 1d Function: Set Pre-defined Variable

Repeat the Row 1b steps but limit the pre-defined variable to Linux machines.

Linux Selection 1 Linux Selection 2

ROW 1e Logic: If/Then/Else

Add if/then/else logic in the else section.

Row 1e Logic

ROW 1e(i) Condition: Custom Field Contains

Select the Custom Field from the dropdown menu inside the If section of the inner if/else.

Select Custom Field 3 Select Custom Field 4

Search and select the SentinelOne Site Key custom field, type NA in the comparator, change "Contains" to "Does Not Equal," and press Enter.

Condition Setup 2

ROW 1e(ii) Function: Set Pre-defined Variable

Search and select the Set Pre-defined Variable function inside the If section of the inner if/else.

Set Pre-defined Variable 3 Set Pre-defined Variable 4

The following function will pop up on the screen:

Set Pre-defined Variable Function 2

  • Type S1SiteToken in the Variable Name field.
  • Select the Custom Field radio button.
  • Search and select the Site-level SentinelOne SiteKey custom field in the Search Custom Field field.
  • Click the Save button to save the changes.
  • Select Windows as the Operating System.

Windows Selection 3 Windows Selection 4

ROW 1e(iii) Function: Set Pre-defined Variable

Repeat the ROW 1e(ii) steps but limit the pre-defined variable to Mac machines.

MAC Selection 3 MAC Selection 4

ROW 1e(iv) Function: Set Pre-defined Variable

Repeat the ROW 1e(ii) steps but limit the pre-defined variable to Linux machines.

Linux Selection 3 Linux Selection 4

ROW 1e(v) Function: Script Exit

Click the Add Row button inside the else section of the inner if/else.

Add Row 2 Add Row 3

Search and select the Script Exit function in the newly appeared row.

Script Exit 1 Script Exit 2

The following function will pop up on the screen:

Script Exit Function

Type the below error message inside the Error Message box and hit save.

Bash Script 1

Error Message

ROW 1e(vi) Function: Script Exit

Repeat the ROW 1e(v) steps but limit the Script Exit function to Mac machines.

MAC Exit

ROW 1e(vii) Function: Script Exit

Repeat the ROW 1e(v) steps but limit the Script Exit function to Linux machines.

Linux Exit

Row 2 Function: PowerShell Script

Add a new row by clicking on the Add Row button.

Add Row 4

A blank function will appear.

Blank Function 2

Search and select the PowerShell Script function.

PowerShell Script Function

The following function will pop up on the screen:

PowerShell Script Popup

Paste in the following PowerShell script and leave the expected time of script execution to 300 seconds. Click the Save button.

PowerShell Script

PowerShell Script Execution

Limit this PowerShell function to run on Windows machines only.

Row 3 Function: Bash Script

Add another row and select the Bash Script function.

Bash Script Function 1

The following function will pop up on the screen:

Bash Script Function 2

Paste in the following Bash script and leave the expected time of script execution to 300 seconds. Click the Save button.

Bash Script 2

Bash Script Execution 1

Limit the bash file to run on Mac machines only.
alt text

Row 4 Function: Bash Script

Add another row and select the Bash Script function.

Bash Script Function 3

The following function will pop up on the screen:

Bash Script Function 4

Paste in the following Bash script and leave the expected time of script execution to 300 seconds. Click the Save button.

Bash Script 3

Bash Script Execution 2

Limit the bash file to run on Linux machines only.
alt text

Row 5 Function: Set Custom Field

Add a new row by clicking the Add Row button.

Add Row 5

Search and select the Set Custom Field function.

Set Custom Field 1

Search and select SentinelOne Deployment Result in the Search Custom Field field, set %output% in the Value field, and click the Save button.

Set Custom Field 2

Limit the function to Windows machines.

Windows Limit

Row 6 Function: Set Custom Field

Repeat the Row 5 steps but limit the function to Mac machines.

Mac Limit

Row 7 Function: Set Custom Field

Repeat the Row 5 steps but limit the function to Linux machines.

Completed Script

Completed Script 1

Completed Script 2

Deployment

This task has to be scheduled on the SentinelOne Deployment group for auto deployment. The script can also be run manually if required.

Go to Automations > Tasks.
Search for SentinelOne Deployment.
Then click on Schedule and provide the parameters detail as necessary for the script completion.

Deployment

Output

  • Script Log
  • Custom Field

Changelog

2025-04-10

  • Initial version of the document