I have two PCs in a home group, XU_XPS acts as the remote PC.
When I ran the following cmdlets with the 1:1 remoting syntax:
PS C:\> Enter-PSSession -ComputerName xu_xps
[xu_xps]: PS C:\Users\Charlie\Documents> notepad
I observed that (1) the 2nd cmdlet hangs on the local powershell session, I have to press CTRL+C to get out of it, (2) there is a notepad process running on the remote machine (checked it via Task Manager or Process Explorer)
When I ran the same command with the 1:N remoting syntax on the local machine:
Invoke-Command -ComputerName xu_xps -Command {Notepad}
I observed the cmdlet finished very quick on the local PC. But I did not see the notepad running on the remote machine either by running Invoke-Command -ComputerName xu_xps -Command {get-process -name n*}, or by running the get-process command on the remote PC, or checking the Task Manager.
In determining if the invoke-command works, I decide to use Process Explorer to monitor the processes on the remote PC. Now when I run:
Invoke-Command -ComputerName xu_xps -Command {Notepad}
I see the notepad program shows up and closes very quick. So the cmdlet works, The current design is that when a cmdlet finishes on the remote machine, the PS session and its invoked processes close automatically. If you really want to keep the notepad process open on the remote machine, you can add Out-NULL cmdlet as below:
Invoke-Command -ComputerName xu_xps -Command {Notepad | Out-NULL}
This is exactly the behavior with the 1:1 remoting syntax. But, you have to manually stop the cdmlet by using CTRL+C.