I have read every other thread on this topic and none of them seem to illuminate what is happening.
I am trying to send a CURL command to my Home Assistant instance by executing a batch file.
C:\Windows\System32\curl.exe -X POST -H "Authorization: Bearer token removed" -H "Content-Type: application/json" -d '{ \"entity_id\":\"script.fan_turnon\" }' http://192.168.1.XXX:8123/api/services/script/turn_on
This command works flawlessly in the command prompt but as a .bat or .cmd a window briefly opens and then disappears. I have attempted to add pause to the end but the same result. What have I stuffed up?
Note: personally identifying information removed from code