• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Podcast
  • Meetups
  • Archives
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp for Desktops
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp for VDI
  • Topics
  • Events
    • Logos & Wallpaper
    • ControlUp.com
  • Join

Targeting Scripts to Specific Devices with ControlUp

Posted on August 10, 2023

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 for Desktops, ControlUp Scripts & Triggers
Topics: Physical Desktops, PowerShell, Scripts, Triggers

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2025 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..