Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. setlocal
  3. REM Script to automate install of a splunk light forwarder on 64bit machines
  4. REM ----------------------------------
  5. REM Map install dir
  6. NET USE T: \\ARRRGGG\SOFTWARE\Admin\Splunk
  7.  
  8. IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto b64
  9. IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" goto b64
  10. :b32
  11. ECHO Detected 32 bit System
  12. set MSI=T:\splunk-4.1.2-79191-x86-release.msi
  13. goto install
  14.  
  15. :b64
  16. ECHO Detected 64 bit System
  17. set MSI=T:\splunk-4.1.2-79191-x64-release.msi
  18.  
  19. :install
  20. REM Install splunk passively
  21. ECHO Starting Splunk Install
  22. msiexec /i "%MSI%" RBG_LOGON_INFO_USER_CONTEXT=1 LAUNCHSPLUNK=1 AUTOSTARTSERVICE_SPLUNKD=1 AUTOSTARTSERVICE_SPLUNKWEB=0 /passive
  23.  
  24. REM pause 10 sec
  25. ping 1.1.1.1 -n 1 -w 10000 >NUL
  26.  
  27. "%PROGRAMFILES%\Splunk\bin\splunk" enable app SplunkLightForwarder -auth admin:changeme
  28. "%PROGRAMFILES%\Splunk\bin\splunk" add forward-server SERVER:9997 -auth admin:changeme
  29. "C:\Program Files\Splunk\bin\splunk.exe" set deploy-poll SERVER:8089 -auth admin:changeme
  30. "%PROGRAMFILES%\Splunk\bin\splunk" edit user admin -password XXXXXXXXX -auth admin:changeme
  31. "%PROGRAMFILES%\Splunk\bin\splunk" stop
  32. REM install forwarder license
  33. MOVE /Y "%PROGRAMFILES%\Splunk\etc\splunk-forwarder.license" "%PROGRAMFILES%\Splunk\etc\splunk.license"
  34. REM "%PROGRAMFILES%\Splunk\bin\splunk" start
  35.  
  36.  
  37. REM disable splunkweb
  38. sc config Splunkweb start= disabled
  39.  
  40. REM unmount T:
  41. NET USE T: /delete
  42. REM pause
  43. endlocal
  44. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement