Powershell Splunk Script

Created below script

msiexec.exe /i <location of the .msi file>
SPLUNKSERVER=admin SPLUNKPASSWORD=PASSWORD1 SPLUNKPASSWORD=PASSWORD1 /quiet
Splunk.exe install C:\Program Files\Splunk
cd /bin
Splunk.exe start

Splunk installs but does not pick licence acceptance, username and password information.

Can anyone advise if this script is correct?

Thanks

Sree,
Welcome to the forum. :wave:t4:

It might be because you did not format your code as code but shouldn’t the arguments be on the same line like the msiexec.exe command? And why do you provide the password twice? Do you get any error messages? If yes - please share them here completely.

BTW: When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

Hi,
Try to use double quotes with variables
e.g.:

SPLUNKSERVER="admin" SPLUNKPASSWORD="PASSWORD1" SPLUNKPASSWORD="PASSWORD1" /quiet

this article can be useful for you:

Thank you for the inputs.

Posted the powershell script below

msiexec.exe /i <location of the .msi file> SPLUNKSERVER=admin SPLUNKPASSWORD=PASSWORD1 SPLUNKPASSWORD=PASSWORD1 /quiet Splunk.exe install C:\Program Files\Splunk cd /bin Splunk.exe start

Thanks for the inputs DejvDzi.

Tried to amend the code and redid the same without luck luck of picking the Splunk installation of Licence, Username and Password auto populated.

Reading through the document and edited few other options but could not get through this.