I am trying to run the following script (I have tried as a .ps1, and putting it directly in inputs.conf)
Get-WmiObject -class win32_service | Select-Object Name,Status,PathName,StartMode,DisplayName,StartName,Started,State
I get this error:
PowerShell FormatException in Stanza powershell2://Service-Info: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
This is inputs.conf
[powershell2://Service-Info]
script = . "$SplunkHome\etc\apps\SA-ModularInput-PowerShell\bin\Service_Info.ps1"
schedule = 0 */10 * ? * *
sourcetype = Windows:Services
I have other scripts that run fine, this is the only one throwing this error
... View more