Skip to content

Instantly share code, notes, and snippets.

@heyseus1
Last active November 23, 2019 00:18
Show Gist options
  • Save heyseus1/43970e66adacf8802cc38ff3d7dcf877 to your computer and use it in GitHub Desktop.
Save heyseus1/43970e66adacf8802cc38ff3d7dcf877 to your computer and use it in GitHub Desktop.
MSI installer script for Splunk universal forwarder
### set deployment host & network path of file
$msbuild = “\\some-network-path\splunkforwarder-7.3.2-c60db69f8e32-x64-release.msi”
$deployment_host = “hostname-example.com:8089"
$arguments = @(
“/i $msbuild”
“DEPLOYMENT_SERVER=$deployment_host”
“WINEVENTLOG_SEC_ENABLE=1”
“AGREETOLICENSE=yes”
“/quiet”
)
if ((Test-Path “C:\Program Files\SplunkUniversalForwarder”) -eq $false)
{Start-Process “msiexec.exe” -ArgumentList $arguments -NoNewWindow -Wait -PassThru}
Else
{Write-Host “app exists!“}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment