Use this script I have added below: open powershell ISE or powershell as administrator: ----------------------------- The path C:\splunk_install needs to be created and put msi and other files in it open Powershell ISE as admin and then run the script make sure the msi name is correct as per the msi you have up to versioning etc. it should be exact name. this works fine for most of people has been tested. ------------------------------- $srcAppPath = "C:\splunk_install\Splunk_TA_windows" $appPath = "C:\Program Files\SplunkUniversalForwarder\etc\apps" #installing forwarder Invoke-Command -ScriptBlock { & cmd /c msiexec /i "C:\splunk_install\plunkforwarder-9.1.2-b6b9c8185839-x64-release.msi" AGREETOLICENSE=Yes /quiet} Write-Host "Installation complete on $file" -ForegroundColor Green Write-Host "Validating install by checking if service is running." Get-Service -Name "SplunkForwarder" -ErrorAction SilentlyContinue Write-Host "SplunkForwarder service is Running on $file" -ForegroundColor Green Write-host "Copying necessary files for splunk ..." write-host "stopping splunk service" -ForegroundColor Green Stop-Service -Name SplunkForwarder #copying addons write-host "copying $srcAppPath" Copy-Item -Recurse -Path $srcAppPath -Destination $appPath -Force write-host "copy $srcAppPath complete" write-host "copying $opappsrc" Copy-Item -Recurse -Path $opappsrc -Destination $appPath -Force write-host "copy $opappsrc conmplete" Start-Service -Name SplunkForwarder Write-Host "Validating by checking if service is running." Get-Service -Name "SplunkForwarder" -ComputerName $file -ErrorAction SilentlyContinue Write-Host "SplunkForwarder service is Running on $file" -ForegroundColor Green write-host "Complete"
... View more