It is possible to have a script with a system or user trigger run on certain device groups or tagged devices by checking the tags/groups within the script itself. The ‘COMPUTERNAME’ environment variable can be used to target devices, and the ‘SIPDEVICEGROUP’ environment variable can filter by Edge DX device group. A device_group text file stored locally can also be used, although the script will still run on all devices before stopping after the check is made. More details can be found at https://support.controlup.com/docs/scripting-guide#targeting-a-script-at-a-specific-device.
Read the entire ‘Targeting Scripts to Specific Devices with ControlUp’ thread below:
When building a script with a system or user trigger is it possible to have it only run on curtain device groups or tagged devices?
You can check the tags/groups from within the script itself and do the check within the script.
Targeting a Script at a Specific Device
To ensure a script only runs on certain devices, you can add a line at the start of the script, for example, in PowerShell:
if ($env:COMPUTERNAME -ne "DESKTOP-BVD8EN4") { return; }
Plain text
You can also filter by Edge DX device group with the SIPDEVICEGROUP environment variable.
https://support.controlup.com/docs/scripting-guide#targeting-a-script-at-a-specific-device
I was originally looking at just targeting by device group from the the device_group text file cached locally but that would still mean the script runs on all devices and just stops after the check is made. I’d like to avoid having the script run at all on non-targeted devices.
Continue reading and comment on the thread ‘Targeting Scripts to Specific Devices with ControlUp’. Not a member? Join Here!
Categories: All Archives, ControlUp Edge DX, ControlUp Scripts & Triggers