Getting Data In

How to run a powershell script on specific computer with arguments passed from dashboard?

batuhankutluca
Explorer

Hi,

I have a deployment app that runs a powershell script on computers. It also send outputs of powershell script to a specific index. So far so good. Now what I want to do is lets assume I have 5 computers that SplunkUF is installed. And my custom deployment app is deployed on these 5 computers. So It means If I set up interval of my script to 5 min, my script runs on these 5 computers and passes output to my indexer. I want to create a dashboard with a dropdown menu and a textbox. Dropdown menu contains these 5 computers and It is to select which computer that I want to run script on. I really don't know If splunk allows me to do that but assume It is doable. Next step is assume again i have 5 scripts in my deployment app. I select a computer from dropdown menu and type "testscript1.ps1" to textbox to determine which script will run on a specific computer. I dug up splunk answers but couldn't find any related question. So If you have any idea about how can I achieve that, please let me know!

Thanks in advance.

0 Karma

woodcock
Esteemed Legend

This is all VERY doable and quite fun. Download the Dashboard Examples app and it will demonstrate everything that you need:
https://splunkbase.splunk.com/app/1603/
Or go through this documentation:
https://docs.splunk.com/Documentation/Splunk/latest/Viz/BuildandeditdashboardswithSimplifiedXML

0 Karma

batuhankutluca
Explorer

Why do you call it fun Mr.Woodcock? It's just a thing I want to achieve. Also I couldn't find a proper dashboard related with my topic from the app. Actually giving some ideas about passing parameters to a deployed script could be more helpful. I think that's all I need tho.

0 Karma

woodcock
Esteemed Legend

The app shows you exactly how to do what you need to do. I think that learning is fun.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...