concept remoting in category powershell

appears as: remoting
Windows PowerShell in Action, Third Edition

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.

Two things should be noted in this example: the script code in the braces can be any PowerShell code, and it will be passed through to the new PowerShell process. The special handling takes care of encoding the script in such a way that it’s passed properly to the child process. The other thing to note is, when PowerShell is executed this way, the output of the process is serialized objects—the basic structure of the output is preserved—and can be passed into other commands. We’ll look at this serialization in detail when we cover remoting—the ability to run PowerShell scripts on a remote computer—in chapter 11.

The ultimate goal for remoting is to be able to execute a command on a remote computer. There are two ways to approach this. First, you could have each command do its own remoting. In this scenario, the command is still executed locally but uses system-level networking capabilities like DCOM to perform remote operations. A number of commands do this, which we’ll cover in the next section. The negative aspect of this approach is that each command has to implement and manage its own remoting and authentication mechanisms.

PowerShell in Depth, Second Edition

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.

Remoting was one of the major new technologies introduced in PowerShell v2 and in the broader Windows Management Framework v2 (WMF v2), of which PowerShell is a part. With v4, Microsoft has continued to invest in this important foundational technology. Most Windows machines, client or server, can be used as the local or remote machine—that is, you can create remote connections to them and you can create remote connections from them. The one exception is Windows RT—you can only remote from machines running that version.

10.3.1. Enabling Remoting

Remoting needs to be enabled on any machine that will receive connections, which can include computers running either the server or a client version of the Windows operating system. Windows Server 2012, and later versions of the server OS, has Remoting enabled by default though client version of Windows don’t. The easy way to set up Remoting is to run Enable-PSRemoting (you need to be running PowerShell with elevated privileges). You could perform all of the steps manually but we don’t recommend it.