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