Skip to content

Instantly share code, notes, and snippets.

@x64onl
Created October 14, 2020 15:31
Show Gist options
  • Save x64onl/1d63ee6f8c29576b4506fa6ff185c9a6 to your computer and use it in GitHub Desktop.
Save x64onl/1d63ee6f8c29576b4506fa6ff185c9a6 to your computer and use it in GitHub Desktop.
Local CrowdStrike Install Script
@ECHO OFF
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File \\network-share\cs-install.ps1
[bool]$installed = $False
[version]$minVersion = "5.35.0.0"
[version]$installedVersion = "0.0.0.0"
Function Install {
\\network-share\WindowsSensor.exe /install /quiet /norestart
}
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | ForEach {
If ($_.DisplayName -Like "CrowdStrike Sensor Platform") {
$installed = $True
$installedVersion = $_.DisplayVersion
}
}
If ($installed) { If ($minVersion -gt $installedVersion) { Install } } Else { Install }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment