liveBook · Manning

Enable-PSRemoting

As explained in Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Enable-PSRemoting is a PowerShell cmdlet that configures a computer to receive PowerShell remoting connections.

Enable-PSRemoting configures a computer to receive PowerShell remoting connections. Run it from an elevated PowerShell session when preparing a computer for remote administration. section 13.4

The cmdlet prepares several parts of the remoting system:

  • Starts the WinRM service and configures it to start automatically. section 13.4
  • Registers PowerShell as an endpoint and creates a default WinRM listener on all local IP addresses. section 13.4
  • Creates a Windows Firewall exception for incoming WinRM traffic. section 13.4

Enable remoting

Open PowerShell as Administrator and run: Enable-PSRemoting. If a network connection is marked Public, the firewall exception may fail; change the connection type before retrying. section 13.4

Figure 13.3 The relationship between WinRM, WSMan, endpoints, and PowerShell

Trace how WinRM and WSMan connect listeners to PowerShell endpoints. section 13.4

How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it

How deep it goes
Explains service, endpoint, listener, and firewall setup, while deferring advanced endpoint permissions and functionality.
Examples
Uses an elevated PowerShell command and a Public-network firewall error as practical setup examples.
What it assumes
Requires an administrator PowerShell session on Windows and awareness of the computer’s network connection type.
What you can do after
Operate/configure a computer for incoming PowerShell remoting connections with Enable-PSRemoting.
How it connects
Connects PowerShell remoting with WinRM, WSMan, endpoints, listeners, and Windows Firewall.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS. The section links point to the parts of the book it draws on.