RunspaceConfiguration missing
njaegergrassl opened this issue · 1 comments
Hi, I need to use RunspaceConfiguration, which is not part of this package.
Is this a known issue or is there an other way of adding an SnapIn?
Thats the code:
RunspaceConfiguration runspaceConf = RunspaceConfiguration.Create(); PSSnapInException PSException = null; PSSnapInInfo info = runspaceConf.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out PSException); Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConf); runspace.Open(); Pipeline pipeline = runspace.CreatePipeline(); pipeline.Commands.Add(command); Collection<PSObject> result = pipeline.Invoke();
This is by design. This was excluded from standard library and RunspaceConfiguration
is no longer part of 7 and those methods are no longer available. Also, snapins are not supported in PSV7.