Retrieving Variables

This chapter discusses the retrieving of Variable-objects. Retrieving the values of Variables is described in chapter Retrieving Variable-values.


To retrieve the objects, representing Variables, the cmdlet Get-EmdbVariable is used.


Examples:


Hint: The execution of these examples requires a connected PowerShell drive.


In order to return all Variables available, this means both, predefined System-Variables as well as user-defined Variables, just call the cmdlet without further parameters:


Get-EmdbVariable


If you want to filter the results returned by the cmdlet, you have several possibilities: for example specify the Variable-name oder part of the name, use the RestrictScope-parameter for filtering based on the scope for which the results are defined oder use the Group-parameter for specifying the Variable-Group. The following example returns all Variables, which have a name beginning with "User" and are valid for the scope "VirtualEnvironments":


Get-EmdbVariable "User*" -RestrictScope "VirtualEnvironments"


The following command returns all Variables defined in the Variable-Group "InternalData":


Get-EmdbVariable -Group "InternalData"


Note: Note that Variables are not part of the context rootDSE and therefore they can be referenced without a full qualified path resp. an absolute path.