Skip to content

Instantly share code, notes, and snippets.

@pax8-dkirby
Created December 15, 2020 16:14
Show Gist options
  • Save pax8-dkirby/55205357b8ea590b7f7a9e50f03053ff to your computer and use it in GitHub Desktop.
Save pax8-dkirby/55205357b8ea590b7f7a9e50f03053ff to your computer and use it in GitHub Desktop.
Installs SentinelOne 64-bit via PowerShell
#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