Getting Data In

SCCM Package for deploying Splunk Universal Forwarder

dperre_splunk
Splunk Employee
Splunk Employee

The question is how do we install Splunk through SCCM and is there any prebuilt packages?

0 Karma
1 Solution

dperre_splunk
Splunk Employee
Splunk Employee

So answering my own question for the community. Whilst this is not Splunk official advice this is what I used in my former role.

Steps are to replace the msi path with the new MSI package, then update your deployment server IP address. Please note, this is setup without a default indexer to send data to. This allows you to customise it down the track :). Please provide feedback if this does not answer your question.

::splunk installer
reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
if %OS%==32BIT GOTO Run32
if %OS%==64BIT GOTO Run64
:Run64
msiexec /i "%~dp0splunkforwarder-6.5.1-264376-x64-release.msi" AGREETOLICENSE=Yes DEPLOYMENT_SERVER=" SERVERNAME:PORT " /quiet
Set MSIError=%Errorlevel%
GOTO End
:Run32
msiexec /i "%~dp0splunkforwarder-6.5.1-264376-x86-release.msi" AGREETOLICENSE=Yes DEPLOYMENT_SERVER=" SERVERNAME:PORT " /quiet
Set MSIError=%Errorlevel%
:End
exit /B %MSIError%

View solution in original post

dperre_splunk
Splunk Employee
Splunk Employee

So answering my own question for the community. Whilst this is not Splunk official advice this is what I used in my former role.

Steps are to replace the msi path with the new MSI package, then update your deployment server IP address. Please note, this is setup without a default indexer to send data to. This allows you to customise it down the track :). Please provide feedback if this does not answer your question.

::splunk installer
reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
if %OS%==32BIT GOTO Run32
if %OS%==64BIT GOTO Run64
:Run64
msiexec /i "%~dp0splunkforwarder-6.5.1-264376-x64-release.msi" AGREETOLICENSE=Yes DEPLOYMENT_SERVER=" SERVERNAME:PORT " /quiet
Set MSIError=%Errorlevel%
GOTO End
:Run32
msiexec /i "%~dp0splunkforwarder-6.5.1-264376-x86-release.msi" AGREETOLICENSE=Yes DEPLOYMENT_SERVER=" SERVERNAME:PORT " /quiet
Set MSIError=%Errorlevel%
:End
exit /B %MSIError%

arrangineni
Path Finder

Can we define a stanza in the script to disable the perfmons metrics that are automatically getting enabled when using the script on the windows 2016 server, any ideas would be very helpful

0 Karma

dperre_splunk
Splunk Employee
Splunk Employee

Hi arrangineni. I had a look at the docs here https://docs.splunk.com/index.php?title=Documentation:Forwarder:Forwarder:InstallaWindowsuniversalfo...

It seems that the default is not to enable perfmon. Are you sure that your deployment server is not enabling this?

0 Karma

sloshburch
Ultra Champion

I love it!

What about moving the package names to be variables at the top. That way you can edit those as builds change but not have to muck around in the script itself.

0 Karma

dstaulcu
Builder

Thanks for sharing. Speaking of install management. Here's a script of last resort that I use to remove the splunk agent on a host when updates or uninstalls routinely fail via MSI.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...