Last Updated: February 25, 2016
·
615
· junjs

Create a link to a folder in PowerShell

Sometimes I need to add my dev folders to the PowerShell enviroment, so I can access them quickly. Than be achieved adding the folders to the Environment Variables.

[Environment]::SetEnvironmentVariable("TestFolderName", "C:\Path\To\Folder", "User")

We can check if we added correctly our folder listing Enviroment Variables

Get-ChildItem Env:

To go to this folder we can use the command

cd $env:TestFolderName

Sources:
https://technet.microsoft.com/en-us/library/ff730964.aspx