How to run "winrm quickconfig" on all LAN computers remotely

5

3

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

Posted 2013-11-08T09:29:07.193

Reputation: 1 858

@Zoredache Why is this a comment and not an answer? I feel this is the proper answer to the question. – Jason Taylor – 2016-01-06T14:52:06.743

1@JasonTaylor because on stackexchange link-only answers are generally discouraged. (links break, they aren't very useful google wise). I was being too lazy at the time to actually create an answer that described the process of using group policies to accomplish this. I was hoping someone else would take the time to follow the link and generate a useful answer. If you want some free rep you could go create an answer with a quick and dirt summary of what is on that link. – Zoredache – 2016-01-06T21:56:20.673

2

Group Policy is the way. http://blogs.msdn.com/b/wmi/archive/2009/03/17/three-ways-to-configure-winrm-listeners.aspx

– Zoredache – 2013-11-09T01:19:50.477

Answers

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.

neo1piv014

Posted 2013-11-08T09:29:07.193

Reputation: 86

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

Posted 2013-11-08T09:29:07.193

Reputation: 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.

UsPeoples

Posted 2013-11-08T09:29:07.193

Reputation: 56