Powershell Gallery and proxy servers

When your pc is using a proxy server to connect to the internet, the following needs to be added to your Powershell profile. Otherwise, you won’t be able to register any Powershell repository. This means you cannot use the commandlet Install-Module to install modules.

Open an elevated Powershell prompt and type:

This will create a new profile when not available, and opens a Notepad for you. Paste the following into your profile and save the file:

Now close your Powershell console, and start a new elevated session. Now it should be possible to register the default repository and you can install any module using Install-Module: