Skip to content

Not update Environment variable list, after add new environment item #15112

@LutAle

Description

@LutAle

Steps to reproduce

# add new environment in Environment stack 
[System.Environment]::SetEnvironmentVariable("e1",'ss',[System.EnvironmentVariableTarget]::user)

Expected behavior

#new environment present in environment stack
#get Environment list
[System.Environment]::GetEnvironmentVariables()

Actual behavior

# New environment missing in listing, but present in
Get-CimInstance Win32_Environment

Environment data

PSVersion                      7.2.0-preview.4
PSEdition                      Core
GitCommitId                    7.2.0-preview.4
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions