Powershell Unable to find module repositories: Difference between revisions
Jump to navigation
Jump to search
(Created page with "When running: <pre>Get-PSRepository</pre> in Powershell and you get the error: <pre>WARNING: Unable to find module repositories.</pre> This is normally because you are behi...") |
No edit summary |
||
Line 1: | Line 1: | ||
When running: | When running: | ||
<pre>Get-PSRepository</pre> | <pre style="color: white; background: #012456; width: 800px"> | ||
Get-PSRepository | |||
</pre> | |||
in Powershell and you get the error: | in Powershell and you get the error: | ||
Line 19: | Line 21: | ||
* Close and re open Powershell | * Close and re open Powershell | ||
* Run | * Run | ||
<pre>Register-PSRepository -Default</pre> | <pre style="color: white; background: #012456; width: 800px"> | ||
Register-PSRepository -Default | |||
</pre> | |||
This should now allow you to register the repos. | This should now allow you to register the repos. |
Revision as of 14:33, 4 September 2019
When running:
Get-PSRepository
in Powershell and you get the error:
WARNING: Unable to find module repositories.
This is normally because you are behind a poxy and you need to set the proxy settings for Powershell, to do this follow these steps:
- Run
notepad $PROFILE
- Notepad will open and probably tell you the file is not present and would you like to create it, select yes and enter the following in the file, obviously changing the proxy to your proxy:
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://YourProxyHostNameGoesHere:ProxyPortGoesHere') [system.net.webrequest]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials [system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true
- Save and exit the file
- Close and re open Powershell
- Run
Register-PSRepository -Default
This should now allow you to register the repos.