3

我可以使用以下命令成功远程访问我们企业中 的一台机器( ComputerA ) 现在我可以在此会话中Enter-PSSession 启动新的ComputerB吗?我做不到。我收到以下错误:Enter-PSSession

Remote host method PushRunspace is not implemented.
    + CategoryInfo          :
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.PowerSh
   ell.Commands.EnterPSSessionCommand

我能够从 ComputerA 上的 powershell 提示符启动会话ComputerB

这甚至可能吗?

谢谢。

4

1 回答 1

4

Enter-PSSession不支持在另一个交互式会话中。相反,尝试Invoke-Command在交互式会话中在远程计算机上运行命令。

PS C:\> Enter-PSSession -ComputerName Server-02
[Server-02]: PS C:\> Invoke-Command -ComputerName Server-03 -ScriptBlock { GCI C:\ } -Credential (Get-Credential)
于 2013-05-01T15:22:29.957 回答