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.

evenyougreg
  • 85
  • 1
  • 6

1 Answers1

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.

Deadly-Bagel
  • 161
  • 4