PowerShell Nugget and Powershell gallery are not getting installed- No internet connection

sns 9,226 Reputation points
2022-04-20T10:45:21.147+00:00

I have created azure VM and tried to execute following commands on powershell, but coming up with below errors.
How do I make sure execute below commands successfully with out giving internet connection error. or how to get it done when there is no internet
Please help
194691-capture.png

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,390 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,096 Reputation points
    2022-04-20T14:37:39.377+00:00

    You can't. You'll have to use a machine that has Internet access to acquire the package/module.

    Here's are a couple of links to examples:
    pwrshl-module-offline.html
    install-powershell-module-offline-without-internet-access

    0 comments No comments