In Unix we have this ~/.bash_profile
file where we can load variables every time we open a terminal. How can I do it in Powershell without admin rights? I mean, it is just my profile. I want to automatically set the proxy variables http_proxy
and https_proxy
every time I open the PS terminal.
Asked
Active
Viewed 18 times
0

João Pimentel Ferreira
- 14,289
- 10
- 80
- 109
-
I hope the linked duplicate answers your question (which is Unix-focused, but applies analogously to Windows too). See also: [about_Profiles](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Profiles) – mklement0 Oct 07 '21 at 13:57
-
@mklement0 is not for LInux, I want for Windows – João Pimentel Ferreira Oct 07 '21 at 13:59
-
It is only the specific paths that are Linux-specific in the linked post - even though the paths are different, all the information there applies to Windows too. If you want a Windows example that includes _programmatic_ creation of the `$PROFILE` file (a pitfall is that the _parent directory_ may need to be created too), see the bottom section of [this answer](https://stackoverflow.com/a/69408793/45375). – mklement0 Oct 07 '21 at 14:10