5

I want to start doing my remote LAN work using powershell, but it seems I need to run winrm quickconfig on all LAN computers before I can remotely connect to them.

How can I run that command on all computers without having to manually go to each computer to run it?

oshirowanen
  • 1,776

3 Answers3

4

You should look into using PSTools (specifically, PSExec) to run it. I believe you can specify a text file with computer names in it for PSExec to run through, and you can use PSexec to do a WinRM quickconfig.

3
psexec \\PCNAMEHERE -s winrm.cmd quickconfig -q

or

psexec \\* -s winrm.cmd quickconfig -q

that "should" hit ever online pc on the network, or, export a list of PC names from AD or SCCM, then save the list as a text file and run this..

psexec @c:\temp\allpcs.txt -s winrm.cmd quickconfig -q
Russ
  • 31
0

The only I can think of is to embed it into a login script. Even then you'd have to elevate the user rights so it can make the changes. The affected keys and services require administrator rights.