I created a function in powershell to access a remote docker host from my windows 10 workstation. You should never just expose the docker socket. Always work with certificates. The official docker documentation has a nice step by step tutorial to do exactly that.
Now I had to insert this command every time I open a new powershell. This annoyed me really fast.
Powershell supports user profiles.
You can check the path with:
Check if a profile file already exists:
If “false” use this command:
Now you just need to insert the function in the profile file: