Add a variable in powershell for hosts file
Create a profile by following this guide: http://www.howtogeek.com/50236/customizing-your-powershell-profile/
Add this line to your Microsoft.PowerShell_profile.ps1 file:
$hosts = "%windir%\system32\drivers\etc\hosts"
Now you can
notepad $hosts or atom $hosts from a powershell running as Administrator
If your profile is not loading just type the following command Set-ExecutionPolicy Unrestricted
(https://support.microsoft.com/en-us/kb/2411920)
Written by Juan Pablo Prado
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#