Agent settings: Variables
Use this dialog box (Tools > Configuration > Agent Settings > Variables) to configure managed device variables that you can use in Windows PowerShell package actions. For more information on actions, see Windows package actions.
When you run a Windows action that includes variables, the variables will be dynamically populated with values specific to the device running the action and the variable setting that was applied to it.
There are three variable types:
- Static: Contains a value that doesn't change (unless an Override value is specified).
- Sensitive data: Data, such as passwords, that will be encrypted so the value isn't visible in the interface or the database.
- Database value: Data from the management database, specified in BNF (Backus-Naur form) format.
- Click Tools > Configuration > Agent Settings, and in the Agent Settings tree click Variables.
- Double-click an existing variable setting, or right-click and create a New one.
- Create a new agent setting with the button or edit an existing variable with the button.
- Enter the variable Name and Description.
- Enter the Global value and Confirm it. This is required and you must put something here. Remember that you can provide an Override value to customize this value in other variable settings.
- Enter an Override value if necessary and Confirm it.
- Click the Commit button. If required fields are missing, you'll see exclamation indicators next to them.
- Click Save when done.
Variable agent settings include over 20 predefined variables. These variables are read-only and generally consist of database values. Many are used internally by Endpoint Manager and others are there for your convenience. You can use the predefined variables in your scripts, or if one of the predefined variables doesn't meet your needs, you can create new variables instead.
When viewing a variable setting, you can either show or hide predefined variables in the list. If you don't want to see the predefined variables, clear the Show predefined variables option.
By default, variables are global and are shared across all variable settings. This means that if you create a new variable in one variable setting, it will then appear in other variable settings too. The exception to this are override values. These values replace the global value with an override value you specify, and are local to the variable setting you are modifying.
Let's say you have a "Browser" variable and the Global value is "Chrome", because that's what most people in your company are using. However, you know that your marketing group uses Firefox instead of Chrome. To make your "Browser" variable work for marketing, you can create a new variable setting, edit the "Browser" variable in it, and change the Override value to Firefox. You would then deploy that modified variable setting to your marketing group and the "Browser" variable would return the correct value for them. If you have another department that uses Opera, you could create a new variable setting again and repeat "Browser" override process for it.
When editing a variable, you can look in the Existing overrides list to see if other variable settings are overriding that variable.