2

I'm getting pumped up for DSC and I want to cover my bases. I see that Enable-PSRemoting actually runs Set-WSManQuickConfig according to help documentation, I guess my main question is, what is the difference between the two? Looks like newer documentation whether it be a book or online article only mentions Enable-PSRemoting and not necessarily Set-WSManQuickConfig. Is Enable-PSRemoting just newer/better? Thanks in advance.

  • AFAIK they are more or less the same. I have no proof, but I think Enable-PSRemoting is suggested and used because the name of the commandlet is a lot more obvious, and easy to remember. – Zoredache Feb 22 '17 at 22:17
  • winrm /qc is what I use – Jacob Evans Feb 23 '17 at 2:03
2

Checked the help documentation of the two cmdlets.

Set-WSManQuickConfig performs the following:

-- Checks whether the WinRM service is running. If the WinRM service is not running, the service is started.

-- Sets the WinRM service startup type to automatic.

-- Creates a listener to accept requests on any IP address. By default, the transport is HTTP.

-- Enables a firewall exception for WinRM traffic .

Enable-PSRemoting also does the above, and additionally:

----- Registers the Microsoft.PowerShell and Microsoft.PowerShell.Workflow session configurations, if it they are not already registered.

----- Registers the Microsoft.PowerShell32 session configuration on 64-bit computers, if it is not already registered.

----- Enables all session configurations.

----- Changes the security descriptor of all session configurations to allow remote access.

----- Restarts the WinRM service to make the preceding changes effective.

So Enable-PSRemoting is the one to use unless you intend on manually configuring sessions.

  • Thanks @Deadly-Bagel, and everyone! Very helpful information. – LaughHammers Feb 23 '17 at 15:00
  • WinRM is the underlying transport for remote PowerShell, WMI, and CIM. The PowerShell specific items are layered on top of that basis. – Matthew Wetmore Feb 24 '17 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.