Deployment Architecture

executionpolicy powershell

jip31
Motivator

hi
i use a powershell script with a scheduled task
the script is in this folder C:\Program Files\xxx\etc\apps\xxx\bin\pingstatus.ps1
i have parameter a PowerShell entry in splunk like this : . "$SplunkHome\etc\apps\Splunk_TA_windows\bin\pingstatus.ps1"

i have to modify automatically the execution policy :powershell.exe -executionpolicy unrestricted -command .\test.ps1)
i try to do this : powershell.exe -executionpolicy unrestricted -command .\pingstatus.ps1) but it dont works
could you help me please???
regards

Tags (1)
0 Karma

jip31
Motivator

i have done this:
PowerShell.exe -ExecutionPolicy Bypass -File '.\Program Files\Splunk\etc\apps\Splunk_TA_windows\bin\pingstatus.ps1'
it works perfectly from PowerShell but not from splunk entry data

0 Karma
Get Updates on the Splunk Community!

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

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 ...