Getting Data In

How to create a script, using Powershell, to run and pull logs from splunk and export them to a file?

mdeer
New Member

Hi,
I was wondering if an event was to occur for a piece of hardware such as changing, going down etc. is it possible to use Powershell create a script to run and pull logs from Splunk and export them to a file.

Thanks.

0 Karma

adonio
Ultra Champion

not exactly sure what you would like to achieve here.
can you elaborate?
how would you know a piece of hardware is down?
does that piece reports to splunk and you want the data from some point in time until the moment it was down?
you can leverage splunk internal capabilities and write an alert / saved search to trigger on the needed condition. from there you can export results to file, send email, execute scripts and more...

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...