Connecting remotely

I am doing a project with Active Directory and I am having trouble:

In Visual Studio I can create a new account in Active Directory successfully. After that, I want to enable email on a Exchange Server. That works when both the program and that Exchange server are on the same computer.

But when I install my program on a User Computer and the Exchange Server is on another computer, I can not connect to the Exchange Server.

I found on Google a possible solution that I don't fully understand:

PSCredential credential = new PSCredential("Administrator@domain.local", securePwd);
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri
      ("http://exchangetestbox:5985/wsman"), 
      "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential);
connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Kerberos;

Runspace runspace = RunspaceFactory.CreateRunspace(connectionInfo);

How do I get the URI variable? I also do not understand: liveIdconnectionUri

November 25th, 2014 3:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics