Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Angel
Resolver III
Resolver III

Powershell - Can't connect to PSGallery

Hi everyone,

 

I am trying to get MicrosoftPowerBIMgmt from PSGallery and it returns an error. The code i have used is:

 

Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module -Name MicrosoftPowerBIMgmt

 

 

It returns an error "PowerShell Gallery is not available. Trying later". 

 

I have tried many days and the error is always the same.

 

Can anyone help me, please?

 

Thanks,

 

 

 

1 ACCEPTED SOLUTION

Hi, @lbendlin 

 

It seems that it depens on the security protocol. I have solved with this code.

 

 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

 

 

You can find the explanation here... 

 

https://superwidgets.wordpress.com/2020/04/11/source-location-https-www-powershellgallery-com-api-v2... 

 

Thanks, anyway...

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Interesting. I didn't have to specify PSGallery. Is your company maybe blocking access?

 

Have you used -Scope CurrentUser  for the module install?

Hi, @lbendlin 

 

It seems that it depens on the security protocol. I have solved with this code.

 

 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

 

 

You can find the explanation here... 

 

https://superwidgets.wordpress.com/2020/04/11/source-location-https-www-powershellgallery-com-api-v2... 

 

Thanks, anyway...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.