It may be a bug... checking now.
EDIT: Confirmed bug. I mistyped the-Priority
parameter as[string]
instead of[int]
. PS7 was forgiving, but PS5 was not.
When Powershell is executed in the background (e.g., from a Blue Iris Run-a-program action), scripts are executed using PS5.
When I test scripts from the Console, I'm usually using PS7. I forgot to test also in Powershell-ISE, which uses PS5.
Makes perfect sense. I should have caught that myself; I appreciate your help!!
New update works a treat. Awesome work!
If time permits, my plan is to write an add-on script or maybe fork yours to work with Home Assistant. My hope is to eventually have more granular control over notifications tied into home automation (i.e. quiet hours, notification debouncer, priority handling when alarm is set, etc)