Installation

Scripted install thrown by upgrade prompt

stuartamurray
Path Finder

I am using a powershell script to deploy Splunk to many servers (circa 150).

Works a treat UNTIL I try to do an upgrade to a new version at which point my install command fails.

Splunk is basically detecting the upgrade and prompting me for a y/n. Can I suppress this prompt and force the upgrade through?

The output I get is as follows:

    Splunk has detected an older version of Splunk installed on this machine. 
To finish upgrading to the new version, Splunk's installer will automatically
update and alter your current configuration files. Deprecated configuration
files will be renamed with a .deprecated extension.

You can choose to preview the changes that will be made to your configuration
files before proceeding with the migration and upgrade:

If you want to migrate and upgrade without previewing the changes that will be
made to your existing configuration files, choose 'y'.

If you want to see what changes will be made before you proceed with the
upgrade, choose 'n'. 

Perform migration and upgrade without previewing configuration changes? [y/n] 
Tags (1)
1 Solution

David
Splunk Employee
Splunk Employee

Have you tried using the /quiet flag? http://www.splunk.com/base/Documentation/latest/installation/installonWindowsviathecommandline 

Alternatively, I would try with this. Not sure if it works on Windows like it does on Linux, though:

%SPLUNK_HOME%/bin/splunk start --accept-license --answer-yes

View solution in original post

David
Splunk Employee
Splunk Employee

Have you tried using the /quiet flag? http://www.splunk.com/base/Documentation/latest/installation/installonWindowsviathecommandline 

Alternatively, I would try with this. Not sure if it works on Windows like it does on Linux, though:

%SPLUNK_HOME%/bin/splunk start --accept-license --answer-yes

stuartamurray
Path Finder

Thanks a lot guys. Much appreciated. That will teach me to RTFM 🙂

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

That output comes when you use a CLI start, I believe, so the --accept-license --answer-yes --no-prompt flags will work as they do in the linux version. You may want to look at http://www.splunk.com/wiki/Deploying_Splunk_Light_Forwarders for a (not PowerShell but CMD.exe) script that has suggested commands and methods.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...