Splunk Cloud Platform

Run Search with API and PowerShell

Splunkie
Explorer

Hello All,

I need help with a PowerShell script to that runs a search on Splunk Cloud via the REST API and retrieve results to be stored in a .csv file. I have put together the script below but I am not having any luck. I keep getting unable to connect to the remote server error. Can you please have a look at my script to help me spot anything I am missing.

Thanks.

Labels (1)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Does your Splunk Cloud stack have REST API enabled (it's off by default)?  If not, open a support case.

Is the IP address of the server running the script on your stack's IP Allow List?  If not, get a Splunk admin to add it.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk + Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...