Help with Installing pswindowsupdate Module via Invoke-Command

0
0
Asked By CuriousCat123 On

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!

1 Answer

Answered By TechieTommy On

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}.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.