Note that there are some explanatory texts on larger screens.

plurals
  1. POOpen Remote Runspace by providing web proxy server's ip address and port
    primarykey
    data
    text
    <p>I am writing a .Net component in C# that needs to open a Remote Powershell connection for Exchange online to execute cmdlets. However there is a web proxy server that sits between local machine and internet. I <strong>have not</strong> provided proxy server settings in IE. I need to somehow provide the ip address and port number of web proxy server while opening the Remote Runspace.</p> <p>I am using the following code :</p> <pre><code>PSCredential credential = new PSCredential(userEmail, securePassword); connectionInfo = new WSManConnectionInfo(new Uri("https://ps.outlook.com/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential); connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Basic; connectionInfo.MaximumConnectionRedirectionCount = 2; runspace = RunspaceFactory.CreateRunspace(connectionInfo); runspace.Open(); powershell.Runspace = runspace; //Create the command and add a parameter powershell.AddCommand("Get-MailboxFolderStatistics"); powershell.AddParameter("identity", sMailbox); ... ... ... pipeline = remoteRunspace.CreatePipeline() foreach (Command command in cmdlet.GetCommands()) { pipeline.Commands.Add(command); } commandResults = pipeline.Invoke(); </code></pre> <p>What should I provide in ProxyAccessType,ProxyCredentials,ProxyAuthentication properties for RunspaceconnectionInfo of Runspace object.</p> <p>Is there a way to open a Remote runspace by providing web proxy server settings without having the proxy settings in IE. I want to pass the proxy server ip and port to my api via a user interface in my application</p> <p>Please suggest.</p> <p>Thanks, Gagan</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload