Getting Data In

Powershell script is throwing off error message, what does it mean?

rsimmons
Splunk Employee
Splunk Employee

I am getting the following error message: 04-21-2010 12:52:07.753 ERROR ExecProcessor - Couldn't start command ""C:\Program Files\Splunk\etc\apps\search\bin\scripts\test1.path"": FormatMessage was unable to decode error (193), (0xc1)

Tags (1)
1 Solution

Leo
Splunk Employee
Splunk Employee

Running powershell scripts with Splunk might seem a little tricky. Here's what my setup looks like:

  • default\inputs.conf
[script://.\bin\myscript.path]
  • bin\myscript.path
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "& '$SPLUNK_HOME\etc\apps\myapp\bin\myscript.ps1' -myarg1 -myarg2"

View solution in original post

Leo
Splunk Employee
Splunk Employee

Running powershell scripts with Splunk might seem a little tricky. Here's what my setup looks like:

  • default\inputs.conf
[script://.\bin\myscript.path]
  • bin\myscript.path
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "& '$SPLUNK_HOME\etc\apps\myapp\bin\myscript.ps1' -myarg1 -myarg2"

sloshburch
Splunk Employee
Splunk Employee

.path wouldn't load environment variables like $SPLUNK_HOME so I had to go with .bat

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Anyone know why the .path vs .bat? Pros/Cons between the two?

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...