<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell unattended installation in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81074#M16725</link>
    <description>&lt;P&gt;I didn't use powershell but this is how I solved the password issue:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;silent install msi with flags AGREETOLICENSE=Yes LAUNCHSPLUNK=0 SERVICESTARTTYPE=auto&lt;/LI&gt;
&lt;LI&gt;remove ca.pem, cacert.pem&lt;/LI&gt;
&lt;LI&gt;remove *.conf from system/local/&lt;/LI&gt;
&lt;LI&gt;remove everything from var/&lt;/LI&gt;
&lt;LI&gt;create a blank file called ftr in $SPLUNK_HOME&lt;/LI&gt;
&lt;LI&gt;copy over your splunk.secret to auth folder (use same splunk.secret file)&lt;/LI&gt;
&lt;LI&gt;copy over your passwd file to etc folder (use same passwd file)&lt;/LI&gt;
&lt;LI&gt;copy over an app with deploymentclient.conf in it pointing to your DS&lt;/LI&gt;
&lt;LI&gt;splunk start --accept-license --answer-yes --no-prompt&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The idea being that if all forwarders use the same splunk.secret seed file, the hashed passwords will be identical across. Then, you can push out apps that already have the hashed passwords in conf files without sending cleartext over the wire.&lt;BR /&gt;
Similarly, overwriting default passwd file with my own, not only do I get rid of the default changeme password as a security precaution, I also automatically create all the accounts I need in one go.&lt;BR /&gt;
No more cleartext passwords. No more wondering if you typoed a password and having no way to check. &lt;BR /&gt;
Single master admin password that works on all of my splunk machines and easy visual verification that the password hashes are correct.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2017 18:15:28 GMT</pubDate>
    <dc:creator>pmalcakdoj</dc:creator>
    <dc:date>2017-07-07T18:15:28Z</dc:date>
    <item>
      <title>Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81069#M16720</link>
      <description>&lt;P&gt;How would you go about creating an unattend intallation on a Windows.  I need a script for hte following reason:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;constancy with base installation (people don't always follow directions and save time trouble shooting).&lt;/LI&gt;
&lt;LI&gt;I dislike installing things by hand.&lt;/LI&gt;
&lt;LI&gt;I won't have physical or remote terminal access to all Installations.&lt;/LI&gt;
&lt;LI&gt;Didn't want to share my passwords (at least obfuscate them).&lt;/LI&gt;
&lt;LI&gt;Handle installation and initial configuration not performed by Deployment Server.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Does anyonehave any good examples or ideas.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2012 02:45:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81069#M16720</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-05T02:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81070#M16721</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It's a great thing to share with the community. Can I suggest one thing...&lt;/P&gt;

&lt;P&gt;You set your question as a proper question and then answer it with the information above, you can then accept it, and it may be picked up by people as a working solution (rather than a question that has not been answered... which is how it would appear at first glance).&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2012 07:44:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81070#M16721</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-10-05T07:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81071#M16722</link>
      <description>&lt;P&gt;I soloved my problem using a couple of Powershell scripts for a scripted unattended install and wanted to share them with the community.  Please keep in mind that this is my first Powershell script and I played around with a few methods, so not the pretties. The there are two scripts, the installer and encoder/decoder which I borrowed from &lt;A href="http://blogs.metcorpconsulting.com/tech/?p=1325"&gt;http://blogs.metcorpconsulting.com&lt;/A&gt;. These scripts are provided as is.&lt;/P&gt;

&lt;P&gt;Note: the script is run on a trusted box. Installation tests where performed with Splunkbeta 5.0.&lt;/P&gt;

&lt;P&gt;The base64encodedecode.ps1 script generates the base64 encoded passwords and splunkinstaller.ps1 is ran locally on you soon to be Splunk instance. splunkinstaller.ps1 assumes all files are in the same directory as the itself.  All other settings will come from the Deployment Server.&lt;/P&gt;

&lt;P&gt;The splunkinstaller.ps1 could use a subroutine for added users and roles.&lt;/P&gt;

&lt;P&gt;Any feed back would be great.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#base64encodedecode.ps1&lt;BR /&gt;
Param(&lt;BR /&gt;
    [string][alias("p")]$password,&lt;BR /&gt;
    [switch][alias("e")]$encode,&lt;BR /&gt;
    [switch][alias("d")]$decode&lt;BR /&gt;
    )&lt;BR /&gt;
If($encode){&lt;BR /&gt;
             ## Display &amp;amp; Log Base64 Encoded password&lt;BR /&gt;
             $encoded = [System.Text.Encoding]::UTF8.GetBytes($password)&lt;BR /&gt;
             $encodedPassword = [System.Convert]::ToBase64String($encoded)&lt;BR /&gt;
             }&lt;BR /&gt;
If($decode){&lt;BR /&gt;
             ## Display &amp;amp; Log Base64 Decoded password&lt;BR /&gt;
             $decoded = [System.Convert]::FromBase64String($password1)&lt;BR /&gt;
             $decodedpassword = [System.Text.Encoding]::UTF8.GetString($decoded)&lt;BR /&gt;
            }&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;The script below has set default values for the unattended installation as well as creates a second user with the admin role.&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#splunkinstaller.ps1&lt;BR /&gt;
#default parameters and other options&lt;BR /&gt;
Param(&lt;BR /&gt;
   [string][alias("id")] $installdir = $(if((Test-Path -Path "D:\")){"`"D:\Program Files\Splunk`""}else{"`"C:\Program Files\Splunk`""}),&lt;BR /&gt;
   [string][alias("ds")] $deployserver = "hellokitty`:8089",&lt;BR /&gt;
   [switch][alias("du")]$defaultUser,&lt;BR /&gt;
   [ValidateSet(0,1)][int][alias("s")]$start = 1, &lt;BR /&gt;
   [string][alias("u")]$domainuser = $(if($defaultUser){"mydomain\myuser"}),&lt;BR /&gt;
   [string][alias("p")]$password = $(if($defaultUser){"Y2ldmU="})&lt;BR /&gt;
)&lt;BR /&gt;
#var initallization&lt;BR /&gt;
$splunkprocesses = @()&lt;BR /&gt;
$pw1='JHBsrMQDQ='&lt;BR /&gt;
$pw2="YldmWU="&lt;BR /&gt;
$match = 0&lt;BR /&gt;
$regex2 = [regex]'(?i)[\d\w\W\D]+splunkbeta[\d\w\W\D]+'&lt;BR /&gt;
$regex1 = [regex]'[\d\w]+VM[\d\w]+'&lt;BR /&gt;
#Functions&lt;BR /&gt;
Function decoder($decode)&lt;BR /&gt;
{&lt;BR /&gt;
    $decoded = [System.Convert]::FromBase64String($decode)&lt;BR /&gt;
    $decodedpd = [System.Text.Encoding]::UTF8.GetString($decoded)&lt;BR /&gt;
    return $decodedpd&lt;BR /&gt;
}&lt;BR /&gt;
Function ckinst($appname)&lt;BR /&gt;
{&lt;BR /&gt;
    $installed = Get-WmiObject -Class Win32_Product | Where-object{$_.name -like "*$appname*"} &lt;BR /&gt;
    If($installed){ return "True"}else{return "False"}&lt;BR /&gt;
}&lt;BR /&gt;
Function pstart([string]$exec,[string]$argments)&lt;BR /&gt;
{&lt;BR /&gt;
    $process = New-Object System.Diagnostics.Process&lt;BR /&gt;
    $process.StartInfo.FileName = $exec&lt;BR /&gt;
    $process.StartInfo.RedirectStandardError = 1&lt;BR /&gt;
    $process.StartInfo.RedirectStandardOutput = 1&lt;BR /&gt;
    $process.StartInfo.UseShellExecute = 0&lt;BR /&gt;
    if($argments){write-host $args;$process.StartInfo.Arguments = $argments}&lt;BR /&gt;
    $process.Start() | Out-Null&lt;BR /&gt;
    $process.WaitForExit() | Out-Null&lt;BR /&gt;
    $errorstream = $process.StandardError.ReadToEnd()&lt;BR /&gt;
    $stdoutstream = $process.StandardOutput.ReadToEnd()&lt;BR /&gt;
    if($errorstream)&lt;BR /&gt;
    {&lt;BR /&gt;
        write-host "Error occurred during Execution of $exec with the following arguments: $argments"&lt;BR /&gt;
        Exit 4&lt;BR /&gt;
    }elseif($stdoutstream)&lt;BR /&gt;
    {&lt;BR /&gt;
        write-host $stdoutstream&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;BR /&gt;&lt;BR /&gt;
#building command line string for install&lt;BR /&gt;
$comstr = " INSTALLDIR=$installdir DEPLOYMENT_SERVER=`"$deployserver`" LAUNCHSPLUNK=$start"&lt;BR /&gt;
if($defaultUser)&lt;BR /&gt;
{&lt;BR /&gt;
    $password = decoder($password)&lt;BR /&gt;
    $comstr += " LOGON_USERNAME=`"$domainuser`" LOGON_PASSWORD=$password"&lt;BR /&gt;
}&lt;BR /&gt;
elseif($domainuser -and $password)&lt;BR /&gt;
{&lt;BR /&gt;
   $comstr += " LOGON_USERNAME=""$domainuser"" LOGON_PASSWORD=`"$password`""&lt;BR /&gt;
}elseif(($domainuser -and !$password) -or (!$domainuser -and $password))&lt;BR /&gt;
{&lt;BR /&gt;
   write-host "Warn: domainuser and password must both be defined" &lt;BR /&gt;
   Exit 4&lt;BR /&gt;
}&lt;BR /&gt;
#finding running path and executables&lt;BR /&gt;
$scriptpath = $MyInvocation.Mycommand.Path&lt;BR /&gt;
$rdir = Split-Path $scriptpath&lt;BR /&gt;
$files = get-childitem $rdir&lt;BR /&gt;
$match = $files | ForEach-Object {$regex2.Matches($_.FullName)}&lt;BR /&gt;
#checking to see if Splunk is already installed&lt;BR /&gt;
$x = ckinst("splunk") &lt;BR /&gt;
if($x -eq "True"){write-host "Splunk already installed Exiting";Exit}else{Write-Host "Installing Splunk"}&lt;BR /&gt;
#running installation&lt;BR /&gt;
if($match -ne 0)&lt;BR /&gt;
{&lt;BR /&gt;
    pstart "msiexec" "/i $match$comstr /quiet"&lt;BR /&gt;
    Start-Sleep -s 10&lt;BR /&gt;
    $x = ckinst("splunk") &lt;BR /&gt;
    if($x -eq "True"){write-host "Splunk successfully installed"}else{Write-Host "Splunk installed failed"; Exit}&lt;BR /&gt;
}else&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "msi or executable not found"&lt;BR /&gt;
    Exit 4&lt;BR /&gt;
}&lt;BR /&gt;
$installdir = $installdir.Replace("`"","")&lt;BR /&gt;
#verifing services&lt;BR /&gt;
write-host "Verifying Services"&lt;BR /&gt;
$splunkprocesses = get-service | where-object{$_.Name -like "*splunk*"}&lt;BR /&gt;
if ($splunkprocesses.length -ne 0)&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "services verified"&lt;BR /&gt;
    #changing user information&lt;BR /&gt;
    write-host "changing user info"&lt;BR /&gt;
    $installdir = $installdir.Replace("`"","")&lt;BR /&gt;
    $splunkexe = "`"$installdir\bin\splunk.exe`""&lt;BR /&gt;
    $pw1 = decoder($pw1)&lt;BR /&gt;
    $pw2 = decoder($pw2)&lt;BR /&gt;
    pstart $splunkexe "add user splunk_local -password $pw1 -role admin -auth admin:changeme"&lt;BR /&gt;
    pstart $splunkexe "edit user admin -password $pw2 -role admin -auth admin:changeme"&lt;BR /&gt;
    New-Item "$installdir\etc\.ui_login" -type "file" -force | Out-Null&lt;BR /&gt;
    write-host "User Info Changed"&lt;BR /&gt;
    if($start -eq 1)&lt;BR /&gt;
    {&lt;BR /&gt;
        write-host "Restarting Splunk"&lt;BR /&gt;
        pstart $splunkexe "restart"&lt;BR /&gt;
        Start-Sleep -s 2&lt;BR /&gt;
        write-host "Restart Complete"&lt;BR /&gt;
    }&lt;BR /&gt;
}else&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "Services do not appear to be installed correctly. Verification required." &lt;BR /&gt;
    Exit 4&lt;BR /&gt;
}&lt;BR /&gt;
write-host "Done"&lt;BR /&gt;
Exit&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Update and streamlined for Heavy Forwarder Install:&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#var initallization&lt;BR /&gt;
$installdir = "C:\Program Files\Splunk"&lt;BR /&gt;
$splunkprocesses = @()&lt;BR /&gt;
$deploy = 'server.yourdomain.com:8089' #Splunk Deployment server&lt;BR /&gt;
$var1='MWwxaB0QA==' #base64 encoded password&lt;BR /&gt;
$var2='NDBZG0z' #base64 encoded password&lt;BR /&gt;
$match = 0&lt;BR /&gt;
$regex2 = [regex]'(?i)[\d\w\W\D]+splunk-5.[\d\w\W\D]+.msi'&lt;BR /&gt;
$regex1 = [regex]'[\d\w]+VM[\d\w]+'&lt;BR /&gt;
#Functions&lt;BR /&gt;
Function decoder($decode)&lt;BR /&gt;
{&lt;BR /&gt;
    $decoded = [System.Convert]::FromBase64String($decode)&lt;BR /&gt;
    $decodedpd = [System.Text.Encoding]::UTF8.GetString($decoded)&lt;BR /&gt;
    return $decodedpd&lt;BR /&gt;
}&lt;BR /&gt;
Function ckinst($appname)&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "Checking Win32_Product for SPlunk"&lt;BR /&gt;
    $installed = Get-WmiObject -Class Win32_Product | Where-object{$_.name -like "*$appname*"} &lt;BR /&gt;
    If($installed){ return "True"}else{return "False"}&lt;BR /&gt;
}&lt;BR /&gt;
Function pstart([string]$exec,[string]$argments)&lt;BR /&gt;
{&lt;BR /&gt;
    $process = New-Object System.Diagnostics.Process&lt;BR /&gt;
    $process.StartInfo.FileName = $exec&lt;BR /&gt;
    $process.StartInfo.RedirectStandardError = 1&lt;BR /&gt;
    $process.StartInfo.RedirectStandardOutput = 1&lt;BR /&gt;
    $process.StartInfo.UseShellExecute = 0&lt;BR /&gt;
    if($argments){$process.StartInfo.Arguments = $argments}&lt;BR /&gt;
    $process.Start() | Out-Null&lt;BR /&gt;
    $process.WaitForExit() | Out-Null&lt;BR /&gt;
    $errorstream = $process.StandardError.ReadToEnd()&lt;BR /&gt;
    $stdoutstream = $process.StandardOutput.ReadToEnd()&lt;BR /&gt;
    if($errorstream)&lt;BR /&gt;
    {&lt;BR /&gt;
        write-host "Error occurred during Execution of $exec with the following arguments: $argments"&lt;BR /&gt;
        Exit 4&lt;BR /&gt;
    }elseif($stdoutstream)&lt;BR /&gt;
    {&lt;BR /&gt;
        write-host $stdoutstream&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;BR /&gt;
#building command line string for install&lt;BR /&gt;
$comstr = " INSTALLDIR=`"$installdir`" SPLUNK_APP=`"SplunkForwarder`""&lt;BR /&gt;
#finding running path and executables&lt;BR /&gt;
$scriptpath = $MyInvocation.Mycommand.Path&lt;BR /&gt;
$rdir = Split-Path $scriptpath&lt;BR /&gt;
$files = get-childitem $rdir&lt;BR /&gt;
$match = $files | ForEach-Object {$regex2.Matches($_.FullName)}&lt;BR /&gt;
#checking to see if Splunk is already installed&lt;BR /&gt;
$x = ckinst("splunk") &lt;BR /&gt;
if($x -eq "True"){write-host "Splunk already installed Exiting";Exit}else{Write-Host "Installing Splunk"}&lt;BR /&gt;
#running installation&lt;BR /&gt;
if($match -ne 0)&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "msiexec /i $match$comstr /quiet"&lt;BR /&gt;
    pstart "msiexec" "/i $match$comstr /quiet"&lt;BR /&gt;
    Start-Sleep -s 10 | Out-Null&lt;BR /&gt;
    $x = ckinst("splunk") &lt;BR /&gt;
    if($x -eq "True"){write-host "Splunk successfully installed"}else{Write-Host "Splunk installed failed"; Exit}&lt;BR /&gt;
}else&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "msi or executable not found"&lt;BR /&gt;
    Exit 4&lt;BR /&gt;
}&lt;BR /&gt;
$installdir = $installdir.Replace("`"","")&lt;BR /&gt;
#verifing services&lt;BR /&gt;
write-host "Verifying Services"&lt;BR /&gt;
$splunkprocesses = get-service | where-object{$_.Name -like "*splunk*"}&lt;BR /&gt;
if ($splunkprocesses.length -ne 0)&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "services verified"&lt;BR /&gt;
    #changing user information&lt;BR /&gt;
    write-host "changing user info"&lt;BR /&gt;
    $splunkexe = "`"$installdir\bin\splunk.exe`""&lt;BR /&gt;
    pstart $splunkexe "disable webserver  -auth admin:changeme"&lt;BR /&gt;
    write-host "Webserver disabled for Heavy Forwarder"&lt;BR /&gt;
    New-Item "$installdir\etc\system\default\deploymentclient.conf" -type "file" -Value "[target-broker:deploymentServer]`ntargetUri = $deploy`n&lt;BR /&gt;
    write-host "Deloyment Server set to $deploy"&lt;BR /&gt;
    $var1 = decoder($var1)&lt;BR /&gt;
    $var2 = decoder($var2)&lt;BR /&gt;
    pstart $splunkexe "add user splunk_local -password &lt;CODE&gt;"$var2&lt;/CODE&gt;" -role admin -auth admin:changeme"&lt;BR /&gt;
    write-host "splunk_local added"&lt;BR /&gt;
    pstart $splunkexe "edit user admin -password &lt;CODE&gt;"$var1&lt;/CODE&gt;" -role admin -auth admin:changeme"&lt;BR /&gt;
    write-host "passwords changed"&lt;BR /&gt;
    pstart $splunkexe "stop"&lt;BR /&gt;
}else&lt;BR /&gt;
{&lt;BR /&gt;
    write-host "Services do not appear to be installed correctly. Verification required." &lt;BR /&gt;
    Exit 4&lt;BR /&gt;
}&lt;BR /&gt;
write-host "Adding Splunk bin to Machine Environment Path"&lt;BR /&gt;
$CurrentValue = [Environment]::GetEnvironmentVariable("Path", "Machine")&lt;BR /&gt;
if(!$CurrentValue.contains($installdir)){ [Environment]::SetEnvironmentVariable("Path", $CurrentValue + ";$installdir\bin", "Machine")}else{write-host "$installdir\bin already exists"}&lt;BR /&gt;
write-host "Done"&lt;BR /&gt;
Exit&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2012 15:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81071#M16722</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-05T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81072#M16723</link>
      <description>&lt;P&gt;Is there a way to change the default 'changeme' password for the admin user within the argument list?&lt;/P&gt;

&lt;P&gt;Example.&lt;/P&gt;

&lt;P&gt;Invoke-Command -ComputerName $totalComputers[$i] -ScriptBlock { &lt;BR /&gt;
Start-Process "c:splunk-6.2.3-264376-x64-release.msi" -Wait -Verbose -ArgumentList (&lt;BR /&gt;
'AGREETOLICENSE="Yes"', &lt;BR /&gt;
'DEPLOYMENT_SERVER="SPLUNKDEPLOY:8089"',&lt;BR /&gt;
"/Liwem!", "C:splunkinstall.log"&lt;BR /&gt;
) }&lt;/P&gt;

&lt;P&gt;Need to change the password for admin before the Splunk service starts...&lt;/P&gt;

&lt;P&gt;thanks for the input..&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2015 14:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81072#M16723</guid>
      <dc:creator>dakira</dc:creator>
      <dc:date>2015-05-20T14:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81073#M16724</link>
      <description>&lt;P&gt;What is $MyInvocation?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 19:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81073#M16724</guid>
      <dc:creator>demodav</dc:creator>
      <dc:date>2016-06-24T19:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell unattended installation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81074#M16725</link>
      <description>&lt;P&gt;I didn't use powershell but this is how I solved the password issue:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;silent install msi with flags AGREETOLICENSE=Yes LAUNCHSPLUNK=0 SERVICESTARTTYPE=auto&lt;/LI&gt;
&lt;LI&gt;remove ca.pem, cacert.pem&lt;/LI&gt;
&lt;LI&gt;remove *.conf from system/local/&lt;/LI&gt;
&lt;LI&gt;remove everything from var/&lt;/LI&gt;
&lt;LI&gt;create a blank file called ftr in $SPLUNK_HOME&lt;/LI&gt;
&lt;LI&gt;copy over your splunk.secret to auth folder (use same splunk.secret file)&lt;/LI&gt;
&lt;LI&gt;copy over your passwd file to etc folder (use same passwd file)&lt;/LI&gt;
&lt;LI&gt;copy over an app with deploymentclient.conf in it pointing to your DS&lt;/LI&gt;
&lt;LI&gt;splunk start --accept-license --answer-yes --no-prompt&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The idea being that if all forwarders use the same splunk.secret seed file, the hashed passwords will be identical across. Then, you can push out apps that already have the hashed passwords in conf files without sending cleartext over the wire.&lt;BR /&gt;
Similarly, overwriting default passwd file with my own, not only do I get rid of the default changeme password as a security precaution, I also automatically create all the accounts I need in one go.&lt;BR /&gt;
No more cleartext passwords. No more wondering if you typoed a password and having no way to check. &lt;BR /&gt;
Single master admin password that works on all of my splunk machines and easy visual verification that the password hashes are correct.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 18:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Powershell-unattended-installation/m-p/81074#M16725</guid>
      <dc:creator>pmalcakdoj</dc:creator>
      <dc:date>2017-07-07T18:15:28Z</dc:date>
    </item>
  </channel>
</rss>

