簡體   English   中英

我可以從遠程會話啟動遠程PowerShell會話嗎?

[英]Can I start a remote powershell session from a remote session?

我能夠使用以下命令成功遠程訪問我們企業中的一台計算機( ComputerAEnter-PSSession現在我可以在此會話中啟動一個新的Enter-PSSessionComputerB嗎? 我無法做到。 我收到以下錯誤:

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM