Getting Data In

Need help executing a script with powershell v3 Modular Input

ribicU
Engager

Could somebody help me with this problem, i have simple powershell script:

Write-Host "Num Args:" $args.Length;
foreach ($arg in $args)
{
  Write-Host "Arg: $arg";
}

and i'm trying to execute with Powershell v3 Modular Input, but i don't know how. In Command or Script Path field says put full path to a script, i did it, but it is not working.

0 Karma
1 Solution

DennisFFM
Explorer

Hi @ribicU, I think it's because your script is not returning something.
"Write-Host" is only printing to console.
Try "Write-Output" instead or save your values to a variable and "return" it in the end.

Dennis

View solution in original post

DennisFFM
Explorer

Hi @ribicU, I think it's because your script is not returning something.
"Write-Host" is only printing to console.
Try "Write-Output" instead or save your values to a variable and "return" it in the end.

Dennis

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...