在至少一些PowerShell v2 PowerShell中,有一个称为"push-runspace“的cmdlet (我被告知)允许您获取本质上是运行远程CTP的本地窗口的内容。但是,此cmdlet和所有*-runspace小程序并不存在于PowerShell v2中。我所能看到的这种功能的唯一提法是:
PS> $host
Name : ConsoleHost
Version : 2.0
InstanceId : 054f6547-8729-417f-a560-bf046fbadc65
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace请注意IsRunspacePushed属性。由此,我假设这种事情仍然是可能的,但是我该如何去做呢?
发布于 2010-11-12 05:59:00
经过一些有根据的猜测,答案是enter-pssession cmdlet。它创建与远程机器的交互会话。
命令get-help about_remoting将提供所有令人讨厌的细节。
https://stackoverflow.com/questions/4159348
复制相似问题