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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

March Community Office Hours Security Series Uncovered!

Hello Splunk Community! In March, Splunk Community Office Hours spotlighted our fabulous Splunk Threat ...

Stay Connected: Your Guide to April Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars in April. This post ...