Help with Installing pswindowsupdate Module via Invoke-Command

June 12, 2025 1 answer
Asked by CuriousCat123
I'm having trouble installing the pswindowsupdate module on my Windows 2016 server using Invoke-Command. The installation works fine when I'm directly on the server console, but when I try to run it with Invoke-Command, I get a warning saying 'Unable to resolve package source 'https://www.powershellgallery.com/api/v2'. I've already confirmed that TLS1.2 is enabled on the server, so I'm not sure what the issue could be. Any insights would be appreciated!

Answers

TechieTommy
Could you share what your script looks like? Just checking to see if there's anything off with it.

CuriousCat123: It's just this: {install-module -name pswindowsupdate}. It works perfectly fine in the console. I'm using: invoke-command -computername server1 -scriptblock {install-module -name pswindowsupdate}.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions