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!

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...