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
Written by Junjie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Powershell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#