Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How can I get a PowerShell script to run at startup and every day thereafter?

$
0
0
How can I set a PowerShell script to run on startup and every 24 hours thereafter on a UF? I have tried using `interval` and `schedule`. Most of my UFs are 7.1.4 but there are some older 6.6 UFs floating around. If I only use `interval`, it will run at startup, but not at any interval. If I only use `schedule`, it will run on the schedule, either using time in seconds or cron, but not at startup. If I use `interval` and `schedule`, it will only follow the schedule parameter. [powershell://LocalAdministrators] disabled = 0 script = & "$SplunkHome\etc\apps\win_scripts\bin\LocalAdministrators.ps1" interval = 86400 schedule = 86400

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>