How it works...
As we saw in the Listing the various providers in PowerShell recipe in Chapter 1, Introducing PowerShell Core, Env is a provider that contains environment-specific configuration. Most of these configuration options are also exposed to us as environment variables. We are able to use the Get-ChildItem and Get-Item cmdlets to list the values of the available environment variables because Env: is a drive within the Env provider. Since environment variables do not have child items, Get-Item and Get-ChildItem return the same output.
Since these variables determine how your session behaves with you, changes made to these values are ephemeral. In other words, the value of $env:PATH is picked from the configuration on your Linux computer. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access