首页 > 解决方案 > 为什么在远程计算机上使用 PowerShell 调用 Get-Service 时出现“Get-WindowSize”未实现错误?

问题描述

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

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

Enter-PSSession -ComputerName Client1 -Credential username

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

[Client1]: PS C:\Users\username\Documents>Get-Service

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

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

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

标签: powershellpowershell-remoting

解决方案


[Client1]:PS C:\Users\username\Documents>Get-Service | 串外

这应该可以,可能是 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


推荐阅读