Search notes:

PowerShell - the env: drive

env: is a drive that makes the names and values of environment variables accessible.

Accessing the value of a given environment variable

The values of specific environment varaiables is returned by prepending the name of the variable with $env::
write-output ""
write-output "userprofile = $env:userprofile"
write-output "home        = $env:home"
write-output ""
Github repository about-powershell, path: /language/provider/env/expand.ps1

Showing all environment variables

The get-childItem cmdlet with -path env: lists all environment variables with their values:
write-output ""
write-output "userprofile = $env:userprofile"
write-output "home        = $env:home"
write-output ""
Github repository about-powershell, path: /language/provider/env/expand.ps1

Misc

Apparently, the env: drive stores its values in System.Collections.DictionaryEntry .NET classes:
cd env:
(get-childItem OS).GetType().FullName

See also

PowerShell providers

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1738303879, '3.141.201.92', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/provider/env/index(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78