Get-EnvironmentVariableNames
Get-EnvironmentVariableNames
Get-EnvironmentVariableNames
SYNOPSIS
Gets all environment variable names.
SYNTAX
DESCRIPTION
Provides a list of environment variable names based on the scope. This can be used to loop through the list and generate names.
EXAMPLES
Example 1
Outputs the names of all the environment variables defined in the registry for the Machine scope.
PARAMETERS
-IgnoredArguments
Allows splatting with arguments that do not apply. Do not use directly.
-Scope
The environment variable target scope. This is Process
, User
, or Machine
.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.String
Outputs the names of all the environment variables in the target scope as strings.
NOTES
Process dumps the current environment variable names in memory / session. The other scopes refer to the registry values.