I have name of my environment variable in Powershell script:
$credEnvName = "Confluence_Data"
How can i retrieve the environment value by this variable?
I tryied this:
$value = ${env:$credEnvName}
But its not working.
I have name of my environment variable in Powershell script:
$credEnvName = "Confluence_Data"
How can i retrieve the environment value by this variable?
I tryied this:
$value = ${env:$credEnvName}
But its not working.
Copyright © 2021 Jogjafile Inc.
You can use
Get-Contentto retrieve its value:Get-Itemexpanding on the.Valueproperty is another option: