- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Invoke Script in Splunk
sanjubaba
Path Finder
12-09-2020
07:34 PM
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![gcusello gcusello](https://community.splunk.com/legacyfs/online/avatars/553812.jpg)
gcusello
![SplunkTrust SplunkTrust](/html/@E48BE65924041B382F8C3220FF058B38/rank_icons/splunk-trust-16.png)
SplunkTrust
12-09-2020
11:42 PM
Hi @sanjubaba,
I think that you're speaking of using a Powershell script for data input.
Anyway, you can use a scripted input (for more infos see at https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro ).
In addition, you could see the Splunk_TA_Windows that uses many PS scripts (https://splunkbase.splunk.com/app/742/).
In few words, you can use the PS script in two ways:
- writing a file:
- create a script that writes results in a file,
- put it in the bin folder of your app,
- schedule it in Windows scheduler,
- read the file with a monitor input;
- Directly sending output to Splunk:
- create a script that send output to video,
- put it in the bin folder of your app,
- schedule it in inputs.conf,
- Universal Forwarder, executes it following the setted configuration and output is directly sent to Splunk.
Second choice is better because you can manage it all in Splunk.
Ciao.
Giuseppe
![](/skins/images/FE4825B2128CA5F641629E007E333890/responsive_peak/images/icon_anonymous_message.png)