Unable to intercept PowerShell remote traffic using Titanium Web Proxy

231 views Asked by At

I want to intercept PowerShell remote traffic. I want to use Titanium because I need to do some intermediate processing on the requests. When I launch the Titanium.Web.Proxy.Examples.Wpf app, out-of-the-box it intercepts all the browser traffic, but not PowerShell remote (Enter-PSSession -ConnectionUri http://localhost:5985/WSMAN/... etc.). I have found that I can see this traffic using Fiddler (requires a bit of tweaking), so I know the traffic can be intercepted. What needs to be done for or in Titanium that isn't happening "out-of-the-box"?

EDIT:

Additional notes:

  • I had seen Fiddler capture the WSMAN traffic on one occasion, but have been unable to reproduce it for reasons as yet unknown.

  • The final implementation will be in a C# assembly, using RunspaceFactory and WSManConnectionInfo, not PowerShell scripting; the Enter-PSSession command above was for illustrative purposes only.

  • When uri is specified as http://127.0.0.1:5985/WSMAN and ProxyAccessType of anything other than None is specified for WSManConnectionInfo, the following exception is thrown: System.Management.Automation.Remoting.PSRemotingTransportException: 'Connecting to remote server 127.0.0.1 failed with the following error message : The WinRM client cannot process the request. Setting proxy information is not valid when the HTTP transport is specified.

0

There are 0 answers