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-Content
to retrieve its value:Get-Item
expanding on the.Value
property is another option: