0

I was trying to install Az-Module in my Ubuntu power-shell, But It wasn't installing than I double checked the PSRepository and I came to know that I don't have any repository there.

I also have tried to Register the default repository But it didn't worked out and Also, I've tried to uninstall power shell and re-install it but nope, Nothing is working out.

Need expert advise on it how to Register PSREPOSITORY successfully and Install Az module.

Muhammad_Bilal
  • 107
  • 1
  • 2
  • 14

1 Answers1

0

Registering PSRepositories requires the repository to be contacted at runtime.

Can you confirm you can access the repository?

invoke-webrequest -Uri 'https://www.powershellgallery.com/api/v2'                        
Ralph Sch
  • 77
  • 6
  • Nope, I got this error: invoke-webrequest: command not found – Muhammad_Bilal Nov 24 '22 at 10:36
  • That cmdlet should be in Microsoft.Powershell.Utility module. Can you import that? It seems strange to me that it should be missing from there. What does `$PsVersionTable` return? – Ralph Sch Nov 24 '22 at 22:55
  • I got this error on powershell 7,0 Invoke-WebRequest: No connection could be made because the target machine actively refused it. – Teshan Mar 28 '23 at 05:35