• 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

Using Tags as Variables in EdgeDX Scripts: A ControlUp Discussion

Posted on August 6, 2024

A discussion took place about using tags as variables in EdgeDX scripts. It was suggested to use Device Groups or environment variables, with some limitations on the characters allowed. There were also discussions about future updates to increase the tag length and whether there is a PowerShell module for EdgeDX. The conversation also touched on the time it takes for a tag to show up on an endpoint and creating new tags through the script. There were some issues with setting the tag initially, but it was resolved by using all lowercase letters and limiting to specific characters. It is possible that the tag length may be increased in the future.


Read the entire ‘Using Tags as Variables in EdgeDX Scripts: A ControlUp Discussion’ thread below:

Anyone know if you can call a tag in an EdgeDX Script as a variable?

for the SecureDX remediation, we have the crowdstrike deploy script, but the CID is unique to the customer. Would prefer to not have a script for every customer that includes their CID, so if we could tag the customer machines then use that tag value that could be helpful


You can use Device Group…. https://support.controlup.com/docs/scripting-guide#scripts-tips-and-tricks

SIPDEVICEGROUP


are there any other variables that can be used or just device group and computername?


Well the example is just using environment variables. You can use any environment variable thats available.


true, ok but any controlup specific variables? so we have device group, device tags? prob not


If you run SET from a command prompt you should see SIPDEVICEGROUP listed.


ok

EDXDEVICEGROUP

looks like this is set as well


Tags might be in there as well? Unless this is like a debug build of the agent.


which one is newer or will they both stay around

also, any future updates to increase the tag length?


Tags should allow up to 100 characters

Is that not enough?


says 12?


oh that’s silly. The UI seems to enforce that. The API was recently increased to 100.


ohhh

well thats probably ok


Is that 12 per tag with a total of 100?


no. 100 per tag


I would think that would make the UI pretty bad.


not too concerned about the UI. the tag length longer will be great

is there a powershell module for edgedx?

or just the openapi?


I read that as openAI. As far as I’m aware there is no module. At least not a public one. I know that @member has one but I’m not sure if that is ready for the public.

@member has published these though.


nice!

getting 401 unauthorized when trying the api call

is this the place to do my api key?

I dont see anything under settings, api keys


https://support.controlup.com/docs/edge-dx-api

The green bit most likely applies to you.


ok. Ill open a ticket then


@member you can use $env:EDXDEVICETAGS


yes! found that one. thank you

anyone know how long it takes for a tag to show up on the endpoint?

when using "set"


I applied one earlier when we were talking and its still not there.


hmm


May take a service restart or machine restart?


ill try restarting the cu service


What script are you using to tag devices ?


I used the console, no script.


yeah I used the console as well


Oh no via the console it need to be immediately

Same with moving a device to a device group


changed device group and i am waiting on it to reflect on the endpoint

tried restarting the services and still not changing in the cmd prompt


can you:

Stop the agent

delete the environment variables for group and tag

start the agent

I’m curious if we only set it if it doesn’t exist already

If that doesn’t work, try including the agent manager in the start/stop as well. It might be the agent manager who sets those


The tag one just doesn’t exist.

Its not like its not being updated, its not there.


yeah same ^^


Microsoft Windows [Version 10.0.22631.3155]

(c) Microsoft Corporation. All rights reserved.

C:\Users\landon>set e

EDXDEVICEGROUP=Windows Machines

EFC_13828=1

C:\Users\landon>


a reboot brought them to me

not crazy about that tbh


I’ll leave my box up as a test. It may be something that is refreshed daily.


ok sounds good

@member I am able to set the tag on the device, but I cannot create a new tag. what is the syntax for actually creating it?


Using the script?


correct


The tags are arbitrary they don’t need to exist. They exist by virtue of being assigned to a device


yeah understood, but when I send the command to set a tag on a device, it errors with a 400 code but if I run it with a tag that already exists, it works


What’s the tag? I don’t have the requirements at hand but I believe it can only be lower case letter, numbers, – and _

Nothing else


I tried simply "crowdstrike" without the quotes

but let me check my lowercase/uppercase

I might not have had that right

yeah it was a capital C!

thank you

awesome yes it is working and I can confirm the length is greater than 12 characters

Continue reading and comment on the thread ‘Using Tags as Variables in EdgeDX Scripts: A ControlUp Discussion’.  Not a member? Join Here!


Categories: All Archives, ControlUp for Compliance, ControlUp for Desktops, ControlUp Scripts & Triggers
Topics: ControlUp Agent, CrowdStrike, Microsoft, Microsoft Windows, Physical Desktops, PowerShell, Scripts

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..