Getting Data In

splunk universal forwarder error installation on Windowa via PowerShell

lumi
Loves-to-Learn Lots

Getting this error via Power Shell for the Splunk Universall installation

 

Error below

The term 'C:\Program Files\SplunkUniversalForwarder\bin\splunk' is not recognized as the name of a cmdlet, function, script file, or operable

program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

working.ps1:17 char:3

 

Here is how i defined my variables

$SplunkInstallationDir = "C:\Program Files\SplunkUniversalForwarder"

& "$SplunkInstallationDir\bin\splunk" start --accept-license --answer-yes --no-prompt

 

It works if i run manually only.  

Kindly assist

Labels (2)
0 Karma

tscroggins
Influencer

Hi @lumi,

Although your command should work, you might try:

$SplunkInstallationDir = "C:\Program Files\SplunkUniversalForwarder"
& "$($SplunkInstallationDir)\bin\splunk.exe" start --accept-license --answer-yes --no-prompt

# or

$SplunkExe = "C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe"
& $SplunkExe start --accept-license --answer-yes --no-prompt

To run "splunk start," the account should have Full Control permission on C:\Program Files\SplunkUniversalForwarder and all subdirectories and files. Ideally, the command should be executed by the service account, assuming the forwarder is also configured to run as a service.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...