[英]Can I start a remote powershell session from a remote session?
我能夠使用以下命令成功遠程訪問我們企業中的一台計算機( ComputerA ) Enter-PSSession
現在我可以在此會話中啟動一個新的Enter-PSSession
到ComputerB嗎? 我無法做到。 我收到以下錯誤:
Remote host method PushRunspace is not implemented.
+ CategoryInfo :
+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.PowerSh
ell.Commands.EnterPSSessionCommand
我可以從ComputerA上的PowerShell提示啟動會話到ComputerB 。
這甚至可能嗎?
謝謝。
不支持在另一個交互式會話中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)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.