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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...