User-defined variables can be set as read-only. There are naming restrictions for variables (example: you can't use secret at the start of a variable name). You can use a variable group to make variables available across multiple pipelines. Use templates to define variables in one file that are used in multiple pipelines.
This article explains how to create and use variable groups in Azure Pipelines. Variable groups store values and secrets that you can pass into a YAML pipeline or make available across multiple pipelines in a project. Secret variables in variable groups are protected resources.
The Remove-Variable cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
The scope of a variable is the range of Transact-SQL statements that can reference the variable. The scope of a variable lasts from the point it's declared until the end of the batch or stored procedure in which it's declared.
You can create a variable and declare its data type and initial value all within one action in your flow in the designer. You can only declare variables at the global level, not within scopes, conditions, and loops.
You can implicitly declare a variable in Visual Basic simply by using it in an assignment statement. All variables that are implicitly declared are of type Variant.
To make an output variable accessible, make sure that the next stage or job depends on the stage or job where you created the variable. If multiple stages or jobs need to use the same output variable, use the dependsOn condition to establish this dependency.
There are many ways to use variables in strings. I'm calling this variable substitution but I'm referring to any time you want to format a string to include values from variables. This is something that I often find myself explaining to new scripters.
Use the Set function to set the value of a global variable, which temporarily holds a piece of information, such as the number of times the user has selected a button or the result of a data operation.
After the environment variable is set, the app is started without a launch profile using the --no-launch-profile option. In the command shell, set the environment variable using the appropriate approach for your operating system.