liveBook · Manning

Remoting

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

Remoting is the execution of commands or management operations on a computer or service over a network connection.

Remoting runs PowerShell commands or management operations on another computer and returns the results to your local shell. The command executes remotely, so you need not install every administrative module on your own computer. section 13.0 section 13.1

Use remoting in two main ways:

  • Use one-to-one remoting to enter a command-line session on one computer. Run commands there as though you were using that computer’s PowerShell, with less overhead than Remote Desktop Connection. section 13.5
  • Use one-to-many remoting with Invoke-Command to run the same command on several computers and collect their results. section 13.0
  • Use remoting as a background job to distribute work across computers. Commands can run in parallel, with up to 32 targets contacted at once by default. section 14.5
Enter-PSSession -HostName Ubuntu1 -UserName tylerl
Enter-PSSession -ComputerName SRV2 -UserName contoso\tylerl

Choose -HostName for SSH connections or -ComputerName for WinRM connections, then authenticate with the appropriate account. section 13.5

Practice remote administration

Connect to one computer, retrieve process information from one or more computers, find the ten newest files in the home directory, and inspect PSVersion remotely. For related commands that must share state, place them in the same invocation; each separate invocation starts PowerShell again from scratch. section 13.10 section 13.9

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

How deep it goes
Explains remote execution, session types, protocols, jobs, and common invocation behavior, while deferring detailed configuration and troubleshooting.
Examples
Uses Enter-PSSession, Invoke-Command, remote process and file queries, PSVersion inspection, and a multi-computer job.
What it assumes
Assumes basic PowerShell command use and requires enabled remoting, reachable computers, and suitable authentication credentials.
What you can do after
Operate remote computers interactively, run commands across targets, and distribute long-running work as jobs.
How it connects
Connects PowerShell with SSH, WinRM, Remote Desktop Connection, background jobs, sessions, and administrative modules.

Also explained in

Compare how 2 books explain remoting →

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.