Question

In at least some of the PowerShell v2 CTPs, there was a cmdlet known as "push-runspace" which (I'm told) allowed you to get what was essentially a local window running a remote PowerShell. This cmdlet, however, and all of the *-runspace ones, are not present in PowerShell v2. The only mention I can see of this sort of functionality is this:

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

Note the IsRunspacePushed property. From this I assume that this sort of thing is still possible, but how would I go about doing it?

Was it helpful?

Solution

The answer, after some educated guessing, is the enter-pssession cmdlet. It creates interactive sessions with remote machines.

the command get-help about_remoting will give you all the nasty details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top