[GH-ISSUE #454] Conditional checks #277

Closed
opened 2026-03-02 02:15:03 +03:00 by kerem · 5 comments
Owner

Originally created by @WouterLS on GitHub (Apr 29, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/454

Hi,

Would it be possbile to have checks based on conditions or variables.
We would implement one server policy that has a basic setup like :

If (application.installed contains "Microsoft DNS") deploy check "DNS service running"
or
if (bitlocker deployed) run task "backup bitlocker key"

This would enable us to implement a large standardized template policy and use the site policy assignement to do small extra's whenever needed.

Originally created by @WouterLS on GitHub (Apr 29, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/454 Hi, Would it be possbile to have checks based on conditions or variables. We would implement one server policy that has a basic setup like : If (application.installed contains "Microsoft DNS") deploy check "DNS service running" or if (bitlocker deployed) run task "backup bitlocker key" This would enable us to implement a large standardized template policy and use the site policy assignement to do small extra's whenever needed.
kerem closed this issue 2026-03-02 02:15:04 +03:00
Author
Owner

@sadnub commented on GitHub (Apr 29, 2021):

You can create a script check that checks if the DNS role is installed and to makes sure the DNS server is running.

If it isn't running when the script finishes you can return a 1 or if it is running return 0 for passing.

<!-- gh-comment-id:829234653 --> @sadnub commented on GitHub (Apr 29, 2021): You can create a script check that checks if the DNS role is installed and to makes sure the DNS server is running. If it isn't running when the script finishes you can return a 1 or if it is running return 0 for passing.
Author
Owner

@wh1te909 commented on GitHub (Apr 29, 2021):

https://wh1te909.github.io/tacticalrmm/functions/scripting/

if you need more help writing script checks please join our Discord and you can ask for help there

<!-- gh-comment-id:829294902 --> @wh1te909 commented on GitHub (Apr 29, 2021): https://wh1te909.github.io/tacticalrmm/functions/scripting/ if you need more help writing script checks please join our Discord and you can ask for help there
Author
Owner

@WouterLS commented on GitHub (Apr 29, 2021):

That's interesting.
That would make that script run on all servers.
Possibly unnecessary on a bunch of them.

I will try that for now..

It would be beneficial to the overall product to have some kind of conditionality so not all checks are done on all agents.

<!-- gh-comment-id:829312218 --> @WouterLS commented on GitHub (Apr 29, 2021): That's interesting. That would make that script run on all servers. Possibly unnecessary on a bunch of them. I will try that for now.. It would be beneficial to the overall product to have some kind of conditionality so not all checks are done on all agents.
Author
Owner

@wh1te909 commented on GitHub (Apr 29, 2021):

that's the whole point of a script check, you're in control and so you write the conditional
for example i have a script check that i have deployed to all agents. at top of script it does its conditional check and if doesn't match, simply returns without continuing

you can also deploy checks to just individual agents. or if you use the Automation Manager you can deploy them per client/site, server/workstation etc so there are already conditionals built in and then the final conditional should be done in your actual script

<!-- gh-comment-id:829336006 --> @wh1te909 commented on GitHub (Apr 29, 2021): that's the whole point of a script check, you're in control and so you write the conditional for example i have a script check that i have deployed to all agents. at top of script it does its conditional check and if doesn't match, simply returns without continuing you can also deploy checks to just individual agents. or if you use the Automation Manager you can deploy them per client/site, server/workstation etc so there are already conditionals built in and then the final conditional should be done in your actual script
Author
Owner

@wh1te909 commented on GitHub (Apr 29, 2021):

you can also run a task based on the condition of a script, so if you script check fails you can then have it run a task (setup an automated task from the UI and select "when check fails" as the trigger)

<!-- gh-comment-id:829337945 --> @wh1te909 commented on GitHub (Apr 29, 2021): you can also run a task based on the condition of a script, so if you script check fails you can then have it run a task (setup an automated task from the UI and select "when check fails" as the trigger)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#277
No description provided.