Is there a way to kick off an audit from within a script? I have written a few scripts that require an audit, and would prefer to have it done automatically.
Unfortunately no. You can't create alarms, or tickets (unless using service desk) either.
This has been brought up before, and hopefully it's on the developers TODO list!
I should clarify... it's possible to do ANYTHING from a procedure, but what you want to do would be not easy. You could, in theory, execute a procedure on the Kaseya server itself to directly modify the audit SQL table in order to force an audit -- but don't ask me how because I've never investigated doing it :)