- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use CLI
How can I access the CLI for Splunk. I have tried for nearly an hour now with no success. The guides are helpful but evidently not nearly enough. Any help is appreciated!
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

usually open a cmd.
go to cd C:\Program Files\Splunk\bin
and run splunk help
Remarks :
- if you see linux commands, with .\splunk you can drop the .\
- but if you switch to powershell, you need them
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have fixed the problem by uninstalling splunk and reinstalling. Never figured out what happened, however.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use it on two different versions of Windows: 7 and 2008 R2 Servers. This is what shows on my splunk-launch.conf along with the other info.
Version 6.1.1
SPLUNK_HOME=C:\splunk\build-home\6.1.0
SPLUNK_DB=C:\splunk\build-home\6.1.0\var\lib\splunk
And I tried to catch the output and it gave me a blank txt file. The WinLog gets the output as the all the standard information and text that shows up on the Splunk CLI, and it says no error, but it closes immediately after opening. I have full administrative powers. Any ideas? I get the same problem when I try on both separatly
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Very strange,
- what is your version of windows ?
- do you have custom system paths for %SPLUNK_HOME% , check the ..\etc\splunk-launch.conf and the windows paths.
To catch the output, you can redirect it to a text file.
splunk cmd btool inputs list > output.txt
notepad output.txt
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried opening CMD as an admin and executing splunk, as well as going to the bin and running splunk as an admin. Both times I had the same result: Splunk CLI opens for a split second and then closes. I'm checking the WinLog events and it gives me Audit Success and No errors when I run it as an Admin-->so that is good. But, however, that doesn't explain why Splunk CLI keeps shutting down on me. Any ideas?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You have to decide what you want to do with the CLI ?
The list of commands is here:
http://docs.splunk.com/Documentation/Splunk/6.1.1/Admin/CLIadmincommands
And if when you run the command, the output pops up in a new window that disappears immediately, this is because you are not running the CMD as administrator.
Please restart your CMD window as administrator (it requires a right click on windows)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, I've narrowed my issue down to "Not enough arguments, please specify a valid command from this list" and then Splunk CLI shutting down. Still, any ideas?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to use cmd, to open it, if I don't use an _ then cmd returns C:\Program is not an executable command. If I do use the _ , it returns that the it could not find the path specified. Okay, now, since I know where it is located, I just went to the folder to open it, but it opens the Splunk CLI and then it closes automatically after about half a second. Any ideas?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whenever I enter the path name in cmd, it can't find it. I have checked the file path multiple times to make sure it's correct. C:\Program_Files\Splunk\bin\splunk
and I have tried every variation of that. The backslashes in between.
