4

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.

2
  • 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, 2017 at 22:17
  • winrm /qc is what I use Feb 23, 2017 at 2:03

1 Answer 1

4

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.

2
  • Thanks @Deadly-Bagel, and everyone! Very helpful information. Feb 23, 2017 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. Feb 24, 2017 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .