"Failed to parse stanza" means that it's failing before PowerShell is ever invoked. That is, that error message is a problem with the configuration, not your PowerShell script.
Your problem is that your "schedule" isn't a valid cron string (at least, not for the Quartz scheduler I'm using). You have to specify the last two digits ( * ? ) ... and without getting into it too deeply: Quartz has an extra "seconds" field on the front of a normal cron string (I didn't notice until after we'd released the first version that normally cron strings aren't that precise).
So anyway, you need to change schedule to be 0 51 10 4 * ? as an example, this would fire at 2:55 on the 11th:
[powershell://PowerShell-Test]
index = powershelltest
schedule = 0 55 2 11 * ?
script = . "$SPLUNK_HOME\bin\scripts\PowerShellTest.ps1"
sourcetype = Windows:PowerShell
P.S. If you're "Unable to initialize modular input" -- that's a completely different error indicating the program can't even run. Usually you're getting PowerShell2 is unable to initialize because you're on a system that has PowerShell 3 or 4, and you don't have the old .Net 3.5 framework installed so we can't run the older PowerShell2.
... View more