Ao usar este site, você concorda com o política de Privacidade.
Aceitar
Entrar em TIEntrar em TIEntrar em TI
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Leitura: PowerShell unable to resolve package source
Redimensionador de fontesAh
Entrar em TIEntrar em TI
Redimensionador de fontesAh
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
  • WINDOWS
  • Lista de coleta de consultas SCCM
Procurar
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Profissional de TI

PowerShell unable to resolve package source

Publicado: Fevereiro 18, 2024
1 Leitura mínima
COMPARTILHAR

PowerShell is unable to resolve the package source.

When trying to import an excel module in PowerShell an enterprise PC I encounter the next error:

unable to resolve package source ‘https //www.powershellgallery.com/api/v2/’

The reason is very simple – trying to install a PowerShell module behind a proxy?

Turns out it isn’t allowed through a proxy server, run this in a PowerShell session and try again:

$webclient=New-Object System.Net.WebClient
$webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredent
MARCADO:PowershellWindowsWindows 10
Artigo Anterior Insider Office 2002 para Windows
Próximo artigo SCCM Error Checking the site
3 Comentários 3 Comentários
  • Andrew McAdam diz:
    Poderia 27, 2020 at 5:45 sou

    You also need to run:
    [Net.ServicePointManager]::SecurityProtocol = “tls12”
    after these lines to make it work.
    At least I needed to.

    Responder
  • Juan R.G> diz:
    Junho 25, 2020 at 4:21 tarde

    Awesome , I was struggling with this for 2 horas , I though antivirus was blocking this but after running these lines it finally worked !!! obrigado

    $webclient=New-Object System.Net.WebClient
    $webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    

    [Net.ServicePointManager]::SecurityProtocol = “tls12

    what exactly these lines do??

    Responder
    • Andrej Prijmak diz:
      Junho 26, 2020 at 2:01 sou

      Oi.
      [Net.ServicePointManager]::SecurityProtocol = “tls12 – will force TLS 1.2 as default in Powershell

      Responder

Deixe uma resposta Cancelar resposta

Seu endereço de e-mail não será publicado. Os campos obrigatórios estão marcados *

Este site usa Akismet para reduzir spam. Saiba como os dados dos seus comentários são processados.

Tradução

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
por Transposh - translation plugin for wordpress

Postagens populares

Requisitos do sistema para Windows Server 2016
Servidor Windows
Lista de coleta de consultas do Configuration Manager
Lista de coleta de consultas do Configuration Manager
Configmgr
Navegação estruturada/gerenciada habilitada em páginas modernas em sites de equipe clássicos
Tecnologia
SCCM Falha ao obter locais de DP como a versão esperada do MP
Configmgr

Postagens recentes

Instalando e configurando Fail2ban para proteção SSH no Ubuntu 24.04
Linux
Como verificar o fuso horário no Linux
Linux
Habilitando e configurando FirewallD no AlmaLinux
Linux
Criação de usuário e configuração de chave SSH no AlmaLinux
Linux

© 2023 Entrar em TI

Vá para a versão móvel
Bem vindo de volta!

Faça login na sua conta

Nome de usuário ou endereço de e-mail
Senha

Perdeu sua senha?