All Apps and Add-ons

Powershell Stops Working- How to resolve this error?

damo66a
Explorer

Im seeing errors whereby powershell inputs just stop for some random reason. The only error I get is the following

failed with exception=The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling "Clear" with "0" argument(s): "Index was outside the bounds of the array."

A simple restart of the SplunkForwardingService on the system makes it work again so theres nothing wrong with the script.

Anyone got any ideas why its doing this? its not just one script or one particular system. Its 2 scripts across 2 different scripts. Same error though

Labels (1)
Tags (3)
0 Karma

HaakonRuud
Explorer

Hi @damo66a 
Did you figure out this issue? 
I also have issues that powershell scripts doesn't seems to be triggered after a while (after working for days and weeks). Restart of the splunk service helps, but after some time it stops again. I can't find any error messages either.

Regards

0 Karma

damo66a
Explorer

just to add, there is no point in my script that calls "Clear" or sets the ErrorPreference. It simply just stops working until a restart of the service

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...