在远程计算机上使用 PowerShell 调用 Get-Service 时,为什么会出现“Get-WindowSize”未实现错误?

Joh*_*hnB 5 powershell powershell-remoting

我有一台 Windows 10 主机,它连接到托管在同一台机器上的 Hyper-V Windows 10 VM。我一直在关注 Pluralsight PowerShell 教程。我正在尝试在远程计算机上获得可用的服务。

我可以使用以下命令在远程计算机上启动会话:

Enter-PSSession -ComputerName Client1 -Credential username
Run Code Online (Sandbox Code Playgroud)

会话开始并连接后,我尝试调用 Get-Service 来识别客户端计算机上的服务。

[Client1]: PS C:\Users\username\Documents>Get-Service
Run Code Online (Sandbox Code Playgroud)

当我运行上述命令时,我收到以下错误消息:

未实现远程主机方法 get_WindowSize。
    + CategoryInfo : ResourceUnavailable: (:) [out-lineoutput], PSRemotingDataStructureException
    + FullQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.PowerShell.Commands.OutLineOutputCommand

我在主机和客户端机器上运行相同版本的 PowerShell ( 5.1.18362.145 )。我认为不知何故这是客户端机器上的问题?

小智 2

[Client1]: PS C:\Users\用户名\Documents>获取服务 | 外串

这应该可行,可能是 PowerShell 或新版本的 Windows 10 的错误

其他链接:https://social.technet.microsoft.com/Forums/en-US/67142783-2acd-4d54-aef2-8d89d71457c5/powershell-remoting-broken-in-windows-10-1903 ?forum=winserverTS