Trouble Installing PSWindowsUpdate Module with Invoke-Command
Asked by
calendar.margin
I'm working on installing the pswindowsupdate module on a Windows 2016 server and running into some issues. When I try to install the module directly from the server console, it works just fine. However, when I attempt to do it using invoke-command, I get a warning that says 'Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.' I've already confirmed that TLS 1.2 is enabled on the server. What could be causing this problem? Any insights would be appreciated!
Answers
Also, you might want to verify if you can use Invoke-WebRequest on the gallery address or any address for that matter. In some cases, security products might block web requests in a WinRM session to prevent potential worms.
Reply to this answer
Have you checked the script you're running? Just to be thorough, can you share it? Sometimes it's easy to miss a small detail that can cause issues.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions