How To Work With Environment Variables In PowerShell

preview_player
Показать описание

Working with environment variables can be a real pain sometimes. In this Snip we'll learn how to create, change, remove environment variables with PowerShell. We'll take a look the environment provider and how we can interact with it like we are used to interacting with the filesystem with commands like Get-ChildItem and Get-Item. A common problem is updating the PATH environment variable. We'll see why the changes don't remain persistent and how we can work around it so we don't need to open it in every new PowerShell session! Last we'll talk about environment variables that store preferences, like PSModulePath. Finally we'll see how we can use [System.Environment] to make changes as well.
Prerequisites include:
N/A

Рекомендации по теме