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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...

Splunk Brings Proof of Control to Digital Asset Transfers

Digital assets now sit inside the core of financial services. HSBC launched its Tokenized Deposit Service in ...

Manage Ingest Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Ingest Processor pipeline, deploy it to the ...