Paul Higinbotham

Results 139 comments of Paul Higinbotham

The administrator restriction is on the remoting (WinRM) endpoint for security and is set by default. It is possible to remove the admin constraint from the endpoint but not advisable....

First, you should use the `System.Management.Automation.PowerShell` type instead of the `System.Management.Automation.RemotePipeline` type, which has been deprecated. ```csharp var connectionInfo = new SSHConnectionInfo("root", "lnx1513", null); var remoteRS = RunspaceFactory.CreateRunspace(connectionInfo); remoteRS.Open(); var...

The `PowerShell` object does indeed support streaming pipeline input/output via the `PSDataCollection` class. See the overloads for `PowerShell.Invoke`, `PowerShell.BeginInvoke`, `PowerShell.InvokeAsync`.

Regarding native command error handling, there has been a lot of discussion about it. I hadn't followed the discussions much, but I think the main problem is that native commands...

`PSDataCollection` is a streaming collection that provides events for data added notifications or can be used as a blocking enumerator.

@SteveL-MSFT The remote case is quite a bit different than the local case, and currently only ErrorRecords affect `HadErrors`, by design. Changing this would require updating the protocol which means...

@Zetanova Are you saying it cannot and that the collection object fills up with data? If so then you are not using it as a streaming collection, where it acts...

@WG-Committee The committee discussed this and agrees that ideally the remote case of `HadErrors` should work as it does in the local case, regarding how native command return codes are...

@Zetanova In case I am not being clear, here is a simple example of using the streaming collection. ```csharp using (var ps = System.Management.Automation.PowerShell.Create(RunspaceMode.NewRunspace)) { ps.AddScript(@"1..10 | foreach { sleep...

Yes, it can be used more or less as a normal collection as well. But really it was designed to support pipeline streaming for the API.