liveBook · Manning

One-to-one remoting

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

One-to-one remoting is an interactive remoting mode that provides a shell session on a single remote computer.

One-to-one remoting opens an interactive PowerShell shell on one remote computer. Commands run there under your authenticated credentials, while results appear in your local shell with less overhead than Remote Desktop. section 13.5

Choose the connection parameter for the protocol you need:

  • Use -HostName for SSH connections. section 13.5
  • Use -ComputerName for WinRM connections. section 13.5
  • Enable remoting on the destination and ensure the hostname or IP address, credentials, domain, and network are usable. section 13.5

Start and recognize a session

Run Enter-PSSession -HostName Ubuntu1 -UserName tylerl or Enter-PSSession -ComputerName SRV2 -UserName contoso\tylerl. A prompt such as [Ubuntu1] PS /home/tylerl> confirms that commands now run on the remote computer.

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

How deep it goes
Defines the session, protocol parameters, prerequisites, credentials, and prompt change, but does not develop automation.
Examples
Demonstrates Enter-PSSession commands for Ubuntu1 and SRV2 and shows their changed remote prompts.
What it assumes
Assumes a reachable computer and usable credentials while teaching the HostName-versus-ComputerName distinction.
What you can do after
Operate PowerShell on a single remote computer through SSH or WinRM and recognize a successful session.
How it connects
Connects PowerShell remoting with SSH, WinRM, authentication, and Remote Desktop Connection.

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.