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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...