Categories
Microsoft PowerShell

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

I was running a command to install a PowerShell module, e.g.

Install-Module -Name navcontainerhelper -Force

while I received the following error message:

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

Solution:

Run PowerShell as Administrator and run the following command to force to use TLS1.2 protocol

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

Did my solution solve your problem? Leave a reply.

Categories
Docker HOW TO Linux Microsoft PowerShell

HOW TO switch between Linux and Windows containers in Docker Enterprise Edition

Out of the box, when you install Docker Enterprise Edition (EE) will run Windows containers. To switch between Windows and Linux containers you need to run the below PowerShell commands with elevated privileges:

To switch to Linux containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")

and then Restart docker service

Restart-Service docker

To switch to Windows containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", $null, "Machine")

and then Restart docker service

Restart-Service docker

Did my HOW TO help you? Leave a reply.