Created
December 15, 2020 16:14
-
-
Save pax8-dkirby/55205357b8ea590b7f7a9e50f03053ff to your computer and use it in GitHub Desktop.
Installs SentinelOne 64-bit via PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Enter the SentinelOne site token here, within the quotes. | |
$SentinelSiteToken = ""; | |
#fill in a publicly available download URl for your SentinelOne *EXE* 64-bit installer here. An Azure blob with a SAS link works well! | |
$SentinelDownloadUrl = ""; | |
#this folder will be used or created, feel free to change it. This variable should not have a trailing \ | |
$tempPath = "C:\temp\MSPTools"; | |
#the script will save the SentinelOne installer as "S1.exe" in the above named folder | |
$SentinelPath = "$tempPath\S1.exe"; | |
function TempPath | |
{ | |
if(Test-Path $tempPath) | |
{ | |
Remove-Item "$tempPath\*"; | |
} | |
else | |
{ | |
New-Item $tempPath -ItemType Directory; | |
} | |
} | |
function SentinelInstall | |
{ | |
If ((Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture -eq "64-bit") | |
{ | |
Set-Location $tempPath; | |
(New-Object Net.WebClient).DownloadFile($SentinelDownloadUrl, $SentinelPath); | |
Start-Process S1.exe -ArgumentList "/SILENT /SITE_TOKEN=$SentinelSiteToken" | |
} | |
else { | |
Exit 1; | |
} | |
} | |
TempPath; | |
SentinelInstall; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment