I'm trying to get data in from a server via a powershell script. I have another app already doing similar on the same server but for some reason (that is driving me up the wall) i constantly get the error:
ERROR Executing script=. "$SplunkHome\etc\apps\vmwareinventory\appserver\static\vmguests.ps1" for stanza=VMWare-Guests failed with exception=The system cannot find the path specified.
I have checked and double checked the spellings, the system variables (for Splunk_Home), renamed the files, the directories and still it comes up with this error. I have followed the instructions to the letter from the Splunk Documentation and still the error persists.
This is my input stanza:
[powershell://VMWare-Guests]
script = . "$SplunkHome\etc\apps\vmwareinventory\appserver\static\vmguests.ps1"
schedule = 30 0 * * *
sourcetype = vm:inventory
index = vmware
disabled = false
Can someone please tell me why this would be happening with this script but not others on the same server?
TIA
Hi @damo66a,
the variables is "$SPUNK_HOME" and not "$SplunkHome", please try using the correct variables or the absolute path.
Ciao.
Giuseppe
Hi @damo66a,
I'm not a PowerShell expert, but let me know if you solved changing the variable.
Ciao.
Giuseppe
so i changed the variable and it made no difference. we're still getting the same "cannot find file specified" error.
we do have other scripts running on this server by Splunk so its somewhat confusing.
Hi @damo66a,
have you seen the Splunk TA Windows (https://splunkbase.splunk.com/app/742)?
then in splunkbase there's this app that I never used Hurricane Labs Add-on for Windows PowerShell Transcript (https://splunkbase.splunk.com/app/4984) that maybe can help you.
Ciao.
Giuseppe