I have some variables that i need to get the value from, the thing is that in the middle of the name i can have any possible value because it's the artifacts name.
Example:
I have these environment variables:
RELEASE_ARTIFACTS__TESTECOMPLETEPR__PROJECTNAME
RELEASE_ARTIFACTS__TESTECOMPLETEPR_REPOSITORY_NAME
And i need something like:
$repoId = (Get-Item -Path Env:RELEASE_ARTIFACTS_*_REPOSITORY_ID).Value
or
$repoId = $Env:RELEASE_ARTIFACTS_*_REPOSITORY_ID
But the * doesn't seem to work.
How can i do this?